$val) { if( preg_match($rx_http, $key) ) { $arh_key = preg_replace($rx_http, '', $key); $rx_matches = array(); // do some nasty string manipulations to restore the original letter case // this should work in most cases $rx_matches = explode('_', $arh_key); if( count($rx_matches) > 0 and strlen($arh_key) > 2 ) { foreach($rx_matches as $ak_key => $ak_val) $rx_matches[$ak_key] = ucfirst($ak_val); $arh_key = implode('-', $rx_matches); } $arh[$arh_key] = $val; } } return( $arh ); } /// } function get_remote_addr(){ if (getenv('HTTP_X_FORWARDED_FOR')) { $ip = getenv('HTTP_X_FORWARD_FOR'); return $ip; } else { $ip = getenv('REMOTE_ADDR'); return $ip; } } print "Who am i?"; print ""; print "

Who I am?


"; $headers = apache_request_headers(); $address = get_remote_addr(); $name = gethostbyaddr($address); print ""; printf("","adresse IP", $address, $name); $ip = getenv('REMOTE_ADDR'); if (strcmp($ip,$address)) { $name = gethostbyaddr($ip); printf("","IP proxy", $ip, $name); } foreach ($headers as $name => $content) { printf("",$name, $content); } print "
%s%s [%s]
%s%s [%s]
%s%s
"; print ""; ?>