i have a question about ip addresses

Status
Not open for further replies.

dbzkid

In Runtime
Messages
129
is there a way to program an html to send some ones ip adress to your e-mail?
like an html that some one visits on a website and send you their ip address through e-mail?
 
Do you mean if someone visits your website, then an automatic script sends their ip address to you?
 
well you'd probably have to find a pre-made script. I'd do some searching on Google
 
Look up the following two scripts, and then work on combining them.

1. PHP-Mail Script (You'll need an SMTP server)
2. PHP-IP Address Logger (or how to save an IP address into a variable).

Then just stick the IP variable into the mail.
 
^Your help is appreciated, and I realize that dates can sometimes be overlooked in a thread, but this thread is over a year old...
 
there are two ways to get the IP address of someone who visits your site...

either look in the server log files (work required = 0).

or write a php script like this

Code:
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$to = "your email"
mail($to, 'visitor IP address', $ip);
?>

you can condense that into a single line if you like
Code:
<?php mail('me@address.com', 'visitor IP address', $_SERVER['REMOTE_ADDR']); ?>
 
Status
Not open for further replies.
Back
Top Bottom