[PHP] RC4 Encrypted IP Logging

Discussion in 'Web Programming' started by kRaeTwin, Dec 26, 2010.

[PHP] RC4 Encrypted IP Logging
  1. Unread #1 - Dec 26, 2010 at 6:27 AM
  2. kRaeTwin
    Joined:
    Dec 26, 2010
    Posts:
    1
    Referrals:
    0
    Sythe Gold:
    0

    kRaeTwin Newcomer

    [PHP] RC4 Encrypted IP Logging

    This is my first post on this forum, so I hope you enjoy it.

    Download this PHP class (not written by me; credits inside it). Make sure to include our class inside the web folder, and that we have a html file in our folder also. Call the html file "log".

    Then we use the following code on our page:

    Code:
    $ip = $_SERVER['REMOTE_ADDR'];
    $date = date("d-m-y / H:i:s");
    $crypto = &new RC4();
    $eIp = $crypto->encrypt("ENCRYPTION KEY", $ip);
    $eDate = $crypto->encrypt("ENCRYPTION KEY", $date);
    $file = fopen("log.html", "a");
    fwrite($file, "IP Address: " . $eIp . "<br />" . "Date: " . $eDate . "<br /><br />");
    
    That will RC4 Encrypt our log so that no one knows who visited the certain page and what time. You can add things to it such as the page it was referred by etc.
    Using this method is an alternative to using MySQL to log.

    MAKE SURE TO REMEMBER YOUR KEY, OTHERWISE IT WILL BE ALMOST IMPOSSIBLE TO RECOVER THE DATA.

    - kRaeTwin :love:
     
< [PHP] Email Bomber | Need Someone To Design Me a New Website >

Users viewing this thread
1 guest


 
 
Adblock breaks this site