Thursday, June 16, 2011

entevava.com: Log use IP address

entevava.com
June 16, 2011 5:30 pm
You have subscribed to these e-mail notices about new posts to the blog.
If you want to change your settings or unsubscribe please visit:
http://entevava.com/post_notification_header/?code=a0ca4a4bc67e212306efaac6b1e301f1&addr=rajileshp.mobile%40blogger.com&

Log use IP address

 < ?php  $address = $_SERVER['REMOTE_ADDR']; $referer = $_SERVER['HTTP_REFERER']; $browser = $_SERVER['HTTP_USER_AGENT'];  $file = fopen("log.html",  "a");    $time = date("H:i dS F"); fwrite( $file, "Time: $time
" ); if( $address != null) { fwrite( $file, "IP Address: $address
"); } if( $referer != null) { fwrite( $file, "Referer: $referer
"); } fwrite( $file, "Browser: $browser

"); fclose($file); ?>

read more...

No comments:

Post a Comment