2010-12-09 19:34:28 +01:00
|
|
|
<?php
|
|
|
|
|
2010-12-11 02:41:39 +01:00
|
|
|
header( "Sample-Header: Hello World" );
|
|
|
|
|
|
|
|
$headers = array();
|
|
|
|
|
|
|
|
foreach( $_SERVER as $key => $value ) {
|
|
|
|
|
|
|
|
if ( substr( $key , 0 , 5 ) == "HTTP_" ) {
|
|
|
|
|
|
|
|
$key = str_replace( "_" , "-" , substr( $key , 5) );
|
|
|
|
$headers[ $key ] = $value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach( explode( "_" , $_GET[ "keys" ] ) as $key ) {
|
|
|
|
echo "$key: " . $headers[ strtoupper( $key ) ] . "\n";
|
|
|
|
}
|