Getting Visitors' IPs AND Avatar Names

Don Sam Stormrage
by Don Sam Stormrage · 46 posts
13 years ago in PHP
Posted 2 years ago
Oh thanks you. I always wondered where I found that PHP script that I used in my project since all that time. But I have modified it a bit to store all the visitors in a log file instead of sending an email each time someone visited my profile. Easier then to work with some regex filtering on that logfile and update my database if needed.
Posted 2 years ago
The original script is working fine if you don't mind to get spammed by emails every time someone visited your profile.

Anyway here is my version of this script for those who wish another way than getting emails.
Obviously you need to change the path where this script will save the logfile.
Also I formated a bit the output so it will also include the date when you got a visitor.
The HTML part is the same as the OP. Nothing changed there.
You may need to create an empty logfile if the script doesn't work straight out of the box the first time.

Code
<?php
$ip = getenv(REMOTE_ADDR);
$avi = $_GET['AviName'];
$datenow = date('Y-m-d H:i:s');
$file = '/path/to/the/logfile';
$message = "[".$datenow."] -- ".$avi." visited your homepage with IP: ".$ip."\n";
file_put_contents($file, $message, FILE_APPEND | LOCK_EX);
?>
Posted 1 month ago
god dammm that is hard to do it
Posted 1 month ago
Thanks loads, i have been meaning to find this tool actually, i was shocked when someone did that to me through imvu and got me thinking and now i understand it, Le me try it out!!!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT
Select a forum Protection     Help & Support     Introductions     Mafia News     IMVU News General Discussion     IMVU Lounge        IMVU Series / Roleplaying        Social Games     Mafia Market     Mafia Tools        Premium IMVU Tools        Off Topic Tools     Off Topic     Contests Creator Corner     Graphics Design        Photoshop        GIMP     Basic Creator Help     Catalog And Product Showcase     3D Meshing        3Ds Max        Sketchup        Blender Gangsters with Connections     White Hat Activities        Google Hacking        Trackers Programming Corner     Coding        Python        .Net (C#, VB, etc)        Flash        JAVA        Autoit        Batch        HTML & CSS        Javascript        PHP        Other        IMVU Homepage Codes           General           About me Panel           Messages Panel           Special Someone Panel           Visitors Panel           New Products Panel           Rankings Panel           Wishlist Panel           My Badges Panel           Outfits Panel           Url Panel           Groups Panel           Slideshow Panel           My Room Panel           Sandbox panel           Layouts     Help & Requests Free Credits     Approved Methods     Submit Methods Free Money     Approved Methods     Submit Methods Adult Corner     Get Mafia AP Here     AP Lounge        AP Social Games        Casual Dating Tips     IMVU Slave Market & Escorts