Click to See Complete Forum and Search --> : IP Return


wakeboarder
03-31-2003, 09:58 PM
How can you, or is it posible :confused: , to, when someone looks at a webpage, have their IP address sent to an e-mail, or just some why where I can look at the IP addresses of everyone looking at my website. Thank you :)

pyro
03-31-2003, 10:01 PM
You will need to use server side code, or try looking in your server logs...

wakeboarder
03-31-2003, 10:04 PM
Ok thank you I'll look for that.

Jona
03-31-2003, 10:05 PM
JavaScript in IE cannot do this without SSIs, but Netscape (at least some earlier versions) with Java enabled (not JavaScript, Java) can get the IP address. But it's always best to use server-side code to get information instantly from everyone viewing your site. You can even set it up to see what they're doing. As a matter of fact, this forum has that functionality. You can click the dropdown box and select, "Who's online?" and it will show who's at this forum and what they're doing. You can get a free tracker at eXtremetracker.com. (I think :p)

wakeboarder
03-31-2003, 10:14 PM
Thank you that was more help full (no offese pyro) and yes they do offer that for free. All your help was much obliged :D

Jona
03-31-2003, 10:32 PM
Pyro knows all that I just typed up, he's just probably so tired of having to answer this question that he just makes his sentences shorter every time. :D

carliedu
04-01-2003, 05:28 AM
If you use PHP you can get the remote IP from
$_SERVER['REMOTE_ADDR'] variable.

Eduardo - Brazil

pyro
04-01-2003, 06:56 AM
Here's a simple Perl version I wrote a while back...

#!/usr/bin/perl

print "Content-type: text/html\n\n";
$sendmail = '/usr/sbin/sendmail';
$adminemail = "you\@yourdomain.com";

open (MAIL, "|$sendmail -t");
print MAIL "To: $adminemail\n";
print MAIL "From: $adminemail\n";
print MAIL "Subject: Ip Address\n\n";
print MAIL "$ENV{REMOTE_ADDR}\n";
close (MAIL);

print "sent";

I'd normally use PHP, but I had written that for someone else, and you're welcome to use it, if you'd like...

utkudiril
04-25-2003, 10:35 PM
Is there no way to somehow get the ip variable in javascript if the server does not have php or perl? Actually I have statcounter (a counter) in my page and I want to check the ip so that if I am connected from my home, it will not source the counter code. Unfortunately the server only has html...

Jona
04-25-2003, 10:57 PM
No.