Getting Visitors' IPs AND Avatar Names

Don Sam Stormrage
by Don Sam Stormrage · 46 posts
13 years ago in PHP
Posted 10 years ago
Oh so this still works Sam?

I'll try it out soon though, when I have the time.
Posted 10 years ago
BloodLustD wrote:
Oh so this still works Sam?

I'll try it out soon though, when I have the time.


I just tested it on myself, it works beautifully.

-- Thu Aug 15, 2013 7:17 pm --

I added a simple check to it to prevent it from emailing me about myself.

[code=javascript file=Untitled.txt]<script type="text/javascript">
var ifr = document.createElement("iframe");
var vName = document.getElementById("mininav-avname").innerHTML;

if(vName.indexOf("YOUR AVI NAME HERE") == -1) {
ifr.src = "http://www.yourwebsite.com/get_info.php?AviName=" + vName;
ifr.style.visibility = "hidden";
document.body.appendChild(ifr);
}
</script>[/code]
Posted 10 years ago
Is getting emailed every time someone visits the page ok for everyone? I could create a variant that saves hits and displays a list of all visitors. And maybe send an email digest once a day (or however often you like).

Anyone interested? To make it work best, you'd need a webhost with a database, though. I've never had one without, but maybe this is an issue for someone.
Posted 10 years ago
little_tramp wrote:
Is getting emailed every time someone visits the page ok for everyone? I could create a variant that saves hits and displays a list of all visitors. And maybe send an email digest once a day (or however often you like).

Anyone interested? To make it work best, you'd need a webhost with a database, though. I've never had one without, but maybe this is an issue for someone.


Always interested in seeing new code.
Posted 10 years ago
This code could become more useful than when it was first written. IMVU inc has limited the visitors panel to only the past 3 visitors on my HP. If we could use this code to script our own fully working visitor panel, without the limitations of the original, maybe add some search features, that would really blow the old visitors panel out of the water.

If we ever wanted a script to keep track of multiple HP's we could use the referer and user agent to track page data.
Posted 10 years ago
Don Von Free Credits wrote:
This code could become more useful than when it was first written. IMVU inc has limited the visitors panel to only the past 3 visitors on my HP. If we could use this code to script our own fully working visitor panel, without the limitations of the original, maybe add some search features, that would really blow the old visitors panel out of the water.


I wonder if they would ban you for this since it would bypass a vip feature.
Posted 10 years ago
Don Von Free Credits wrote:
If we ever wanted a script to keep track of multiple HP's we could use the referer and user agent to track page data.

What exactly do you want to do? Track user movements between pages that have out future tracker installed? Referer data might not be transmitted corretly, btw, as we're using an iframe.

If you want real trackings, it might be beter to just add a real tracking code, e.g. Piwik. No need to rewrite all the functions someone else has already built ;)
Posted 10 years ago
little_tramp wrote:
Don Von Free Credits wrote:
If we ever wanted a script to keep track of multiple HP's we could use the referer and user agent to track page data.

What exactly do you want to do? Track user movements between pages that have out future tracker installed? Referer data might not be transmitted corretly, btw, as we're using an iframe.

If you want real trackings, it might be beter to just add a real tracking code, e.g. Piwik. No need to rewrite all the functions someone else has already built ;)


I was not thinking of anything as fancy as full blown tracking; just the ability to easily use the same script on multiple HP's and distinguish which HP the visitor went to. You are right though, the referrer data might not be transmitted correctly. Still, it might be worth playing around with for the sake of people with multiple alt accounts who wish to use the code on more than 1 HP. Then again, we could simply hardcode an ID to each declaration of the script to distinguish between HPs.
Posted 9 years ago
Here's a modified version that will also send you the homepage url the person visited. This is useful if for instance you have more than one IMVU account and want to know who visits each one.

Code
<script type="text/javascript">
   var ifr = document.createElement("iframe");
   var vName = document.getElementById("mininav-avname").innerHTML;
   var url = document.URL;
   
   if(vName.indexOf("YOUR AVI NAME HERE") == -1) {
      ifr.src = "http://www.yourwebsite.com/get_info.php?AviName=" + vName + "&Homepage=" + url;
      ifr.style.visibility = "hidden";
      document.body.appendChild(ifr);
   } 
</script>



PHP:

Code
<?php
$ip = getenv(REMOTE_ADDR);

$avi = $_GET['AviName'];
$uri = $_GET['Homepage'];

mail("spmcontainer@gmail.com", "Your homepage visitor", "IP: " . $ip . "\nAvatar: " . $avi . "\nURL:" . $uri);
?>




I have not been able to full test it under all conditions so you'll have to let me know if there's any instance in which it doesn't send you the correct homepage url.
Posted 9 years ago
can you offer me a webhost which provides PHP hosting and email service, pls?

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