Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Just Visited IP Sniffer Script ( FREE )

422422 MVP
edited April 2012 in Vanilla 2.0 - 2.8

Ever want to see instantly, who is visiting your website ?

Just 4 or 5 lines of code to add , its simple.

Get emailed immediately, with their IP and a clickable link to InfoSniper

Well I have created this script for you, you can use at your own peril. Because you may get a ton of emails ( if you have a busy website !!! )

All instructions are in the ZIP.

Download here

Test it here


What it does ?

Ok each time a user or robot visits your website, you will receive an email. SIMPLE !

Typical Email is:

IP ADDRESS: http://www.infosniper.net/index.php?ip_address=66.249.69.109 has just visited the Wicked Forum owned by 422

Enjoy.

There was an error rendering this rich post.

Tagged:

Answers

  • .reserved for likes. LOL

    There was an error rendering this rich post.

  • peregrineperegrine MVP
    edited April 2012

    @422 you can add this to your arsenal of downloads if you desire. If you get rich off this script,you can buy me whatever beer your drinking someday. Logs date time and ip to a file.

      <?php
        logit();
    
        function logit() {
            $date =date('Ymd');
            $time=strftime("%H:%M");
            $ip = getenv('REMOTE_ADDR');  
            $info="$date,$time, $ip\n";
            $logger = "ipvisits.txt";
             if(!($fp = fopen($logger, "a"))){
               die("Cannot open $logger");
              }
              fwrite($fp, $info);
              fclose($fp);
    
        }   
        ?>
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Will add it in a few mins, ty.

    Can you do a readme to plz

    There was an error rendering this rich post.

  • This code works in any php page.  place it anywhere.  It will create a log "ipvisits.txt" in the directory where the php page is located.  The directory where it is located must be writeable.  The file keeps growing and growing. you can erase the ipvisits.txt  each time you want to start a new log.
    
    the name of the file is here, you can change ipvisits.txt to whatever you want.
    
    $logger = "ipvisits.txt";
    
    ===insert this code in your page if you want to log the hits by date,time and ip====
        <?php
        logit();
        function logit() {
        $date =date('Ymd');
        $time=strftime("%H:%M");
        $ip = getenv('REMOTE_ADDR');
        $info="$date,$time, $ip\n";
        $logger = "ipvisits.txt";
        if(!($fp = fopen($logger, "a"))){
        die("Cannot open $logger");
        }
        fwrite($fp, $info);
        fclose($fp);
        }
        ?>
    =============================================================
    
    results:
    
    Logs date time and ip to a file.
    
    an example of the text file is:
    date      time    ip of visitor
    
    
    20120428,12:00, 127.0.0.1
    20120428,13:28, 192.168.0.1
    20120429,01:28, 192.168.15.1
    
    Brought to you by VanillaSkins.com the worlds number 1 theme developers for Vanilla Forums
    with pinch-hitter programming by peregrine.
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • 422422 MVP
    edited April 2012

    Added :) thanks, also put a note to ensure the txt file is chmodded 777

    Cheers Mate :)

    Peregrines Download Link : http://vanillaskins.com/downloads/download.php?file=ip_hits_by_peregrine.zip

    There was an error rendering this rich post.

  • cheers!

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • fh111fh111 ✭✭
    edited April 2012

    i'm just curious what this would be useful for. i never care to look at ip's (so far)

  • 422422 MVP
    edited April 2012

    We actually use this, slightly modified version on our big sites. To track when we are being indexed.

    There was an error rendering this rich post.

  • fh111 said:
    i'm just curious what this would be useful for. i never care to look at ip's (so far)

    spammers

    and then adding ip to .htaccess

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • You know IP address are all logged by default in almost all webservers access logs right? Just look there instead of adding random code snippets.

  • peregrineperegrine MVP
    edited April 2012

    Gillingham said:
    You know IP address are all logged by default in almost all webservers access logs right? Just look there instead of adding random code snippets.

    You are correct. some people might not know, but if they read this message they will know.

    I know, I would have to assume 422 knows.

    rebuttal and rhetorical question: I don't know why there is more than one type of browser and more than one operating system and more than one forum software.
    Could it be choices???
    If you are a moderator and don't have access to access logs, this could be helpful, but if its not don't use it - would be my answer.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • You could quite easily modify this without touching core files.

    Eg. Whitelists, blacklists. Or even to allow particular users to view certain pages, with some modification. Plus if you are mobile on iphone ipad etc, you get instant email notifications.

    We use when we deploy say, seo campaign for clients. We can log robot activity, or as we do we input the web owners email address and they can see activity, without having to give them cpanel access etc.

    There was an error rendering this rich post.

  • As @peregrine said, an analogy of which is a very old salesmans tool.

    Boss sends two shoe salesmen to the sahara desert, packed with shoes.

    Seven days later he calls salesman number one, hows it going he asks ?

    Crap says the guy, these desert dwellers dont wear shoes ! Bring me back.

    He calls salesman number two, asks the same question...

    The guy says send me more more more, these desert people didnt wear shoes !

    Its how you approach an issue.

    There was an error rendering this rich post.

Sign In or Register to comment.