Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Greetingz! I've new to web development, and have made a submit an email form using the standard form in html scrpt. Sadly, I need to email with the users IP address. This is what I've come up with to display the IP address, but when I check it with dreamweaver I see nothing, nor do I see anything on my server when I upload it. Any ideas appreciated. This is the script:
888888888888888888888888888888888888888888<?
echo "$REMOTE_ADDR";
?>
<?php echo $REMOTE_ADDR; ?>
<?
$hst = $_SERVER["HTTP_HOST"];
$uri = $_SERVER["REQUEST_URI"];
$rmt = $_SERVER["REMOTE_ADDR"];
$br = $_SERVER["HTTP_USER_AGENT"];
echo "Your IP address reflects as : $rmt \n
\n The page you requested was: $uri \n
\n The browser you are using is $br";
?>
88888888888888888888888888888888888888888888
im trying to use it here if you wish to see it:
http://www.doc.ic.ac.uk/~md103/addMe.htm
Thanx,
Michele
UPDATE! I have discovered what was wrong. Im posting this for other who might be in my same headcase. The file addme.htm should be renamed to addme.Shtml. the S for server side includes.
SPinal
Report Offensive Follow Up For Removal
Umm except you displayed your own host's IP address.
look 146.169.1.10 ... found
Name : linnet.doc.ic.ac.uk (.UK | United Kingdom)
Address : 146.169.1.10Also, you don't have to use .shtml. You can upload an .htaccess file to your root, containing this line (if your host allows it to be used):
XBitHack on
That will allow you to parse standard .html files as if they were .shtml, by CHMOD-ing the files you wish to be parsed as Owner = rwx.
Report Offensive Follow Up For Removal
REMOTE_ADDR is the visitors address
Sign Me Guestbook!
jaymc.co.nr
Report Offensive Follow Up For Removal
Hello again. I have been quite perplexed by this. According to the apache documentation, REMOTE_ADDR is the visitors address. Also, when I look at the source of other sites that show my ip, they use remote addr. I've come to the assumption that the server has some for of anonymous proxy and/or firewall that stops the REMOTE_ADDR from working properly.
Spinal
Report Offensive Follow Up For Removal
No idea. I am tempted to suggest that as it's on a .ac.uk network, they may have special protections in place to comply with some govt. regulations re. academic domains, etc. Maybe Jamie could try a mirror on his site, since he is in a .ac.uk arena too, see what happens?
Report Offensive Follow Up For Removal
If Jamie want to try (I know him by fame, his posts precede him :p ); he can feel free to do so. I have a prolog exam tomorrow, so I'm going into uni, let's see if they can answer some questions.
Spinal
Report Offensive Follow Up For Removal
Well, it tells me im in some european country, thanks to my proxys, so its kind of useless....why do you need the ip grabber anyway?
Excell Hosting for all your hosting needs.
Report Offensive Follow Up For Removal
![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |