Getting Visitors' IPs AND Avatar Names

Don Sam Stormrage
by Don Sam Stormrage · 46 posts
13 years ago in PHP
Posted 9 years ago
duncan wrote:
can you offer me a webhost which provides PHP hosting and email service, pls?


http://www.000webhost.com/
Posted 9 years ago
thank you Bulldog, I tried that and I couldnt manage to insert the php into the root. I go atmost to build my website (which wasnt my intention lol) via Zyro web builder and inserting html. Im still trying and if you know some neat way to do it I will be glad to learn. have a nice day
Posted 9 years ago
no, i dont use filezilla. after try and error I now use its own tool to upload. but now I dont get mails, still working on it.

-- Sun Apr 19, 2015 10:22 am --

after 000webhost, tried ultimatefreehost.in and phpzilla.net and couldnt make it working. got another adress on imvu to try everytime I made a change. now I'm in despair :(
Posted 9 years ago
duncan wrote:
no, i dont use filezilla. after try and error I now use its own tool to upload. but now I dont get mails, still working on it.-- Sun Apr 19, 2015 10:22 am --after 000webhost, tried ultimatefreehost.in and phpzilla.net and couldnt make it working. got another adress on imvu to try everytime I made a change. now I'm in despair


Show us your code.

Also, see my post here for working code: viewtopic.php?p=124519#p124519 Maybe there was a typo in your code.

You can also try manually visiting the php file to test if it's working. You do not need to load it onto your IMVU homepage. You just need to enter in the web address to the file into your address bar with a value and go. For example:
Code
http://www.SomeWebHost.com/get_info.php?AviName=SomeTextHere
Posted 9 years ago
I copied the codes from here. then to be fully sure, I downloaded them and edited the necessary fields. Also, checked the php.net/manual/en/function.mail.php and tried 'myemail@gmail.com' instead of "myemail@gmail.com".

used gettt.php instead of get_info.php thinking that _ symbol may cause something :D
my codes are mainly:
php:

<?php
$ip = getenv(REMOTE_ADDR);

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

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

script in imvu my url panel(open for public):
<html><body><script type="text/javascript">
var ifr = document.createElement("iframe");
var vName = document.getElementById("mininav-avname").innerHTML;
var url = document.URL;

if(vName.indexOf("sme") == -1) {
ifr.src = "http://www.dizciple.phpzilla.net/gettt.php?AviName=" + vName;
ifr.style.visibility = "hidden";
document.body.appendChild(ifr);
}
</script></body></html>
Posted 9 years ago
duncan wrote:
tried 'myemail@gmail.com' instead of "myemail@gmail.com".

That won't make a difference.

duncan wrote:
used gettt.php instead of get_info.php thinking that _ symbol may cause something

The underscore ( _ ) doesn't cause any issues.


Just an FYI, you're telling it to create a variable with the values of a parameter that doesn't exist, thereby creating an empty variable on this line:
Code
$uri = $_GET['Homepage'];


You're not passing a homepage parameter here:
Code
ifr.src = "http://www.dizciple.phpzilla.net/gettt.php?AviName=" + vName;


The correct syntax would be:
Code
ifr.src = "http://www.dizciple.phpzilla.net/gettt.php?AviName=" + vName + "&Homepage=" + SOMETHING;




---------------------------

Though none of what I said above is causing any real problems, I tested it and the mail function still works with an empty value. I'm not seeing anything that would be breaking the script, so the only thing I can suggest is making sure the panel you put the code in is visible to people.

Also:

To make sure php is working with your webhost, simply upload a new php file containing this:
Code
<?php
echo "I AM A PHP FILE AND IM WORKING"
?>


Then paste this code into one of your panels OR use your web browser's console to run the code while on your homepage:
Code
var ifr = document.createElement("iframe");
ifr.src = "PATH/TO/PHP/FILE/HERE.php";
ifr.style.visibility = "visible";
document.body.appendChild(ifr);


If done correctly, you should see a new box at the bottom of the page that says "I AM A PHP FILE AND IM WORKING"
Posted 9 years ago
I tried the last suggestion and I got the working message.
also, amended the homepage parameter as:
ifr.src = "http://www.dizciple.phpzilla.net/gettt.php?AviName=" + vName + "&Homepage=" + url;

I use shown panels and checking the mails in the spam folder as well.

I was suspicious about my ISP, so I use vpn. Still got no e-mail.

you can check my website that I installed the php files: http://www.dizciple.phpzilla.net

-- Sun Apr 19, 2015 1:40 pm --

By the way, Im not sme in imvu, I wasnt aware of someone in that name exists. so, please dont bother him because of me :D
Posted 9 years ago
Does this only work for HP visitors? Is there a way to get the IP address for those you actually chat with in the client?
Posted 9 years ago
ThatsOnlyMe wrote:
Does this only work for HP visitors? Is there a way to get the IP address for those you actually chat with in the client?


Yes, it only works with HP visitors. You can send the people you chat with in the client a link to your HP ... and hope they click on it.

I guess you could make a flash product and have the flash product load the script through a URLRequest. Then load the flash product into the chat.

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