Another Questions... Regarding Ip Addresses...

liunx

Guest
Hi again... I'm in search once again for another script or something that will allow me to display a user's ip address on my website... kind of a tracker and displays it on my website....<br /><br />I searched for some code, but no luck....<br /><br />Basically it would read on a page:<br /><br />"For security purposes, your IP address will be logged: 225.258.264.356"<br /><br />And this would actually record the person's ip address into a file on my server?? Anyone know of anything close to it out there? If not at least something that would display their IP on the page...<br /><br />Thanks again!!! <br /><img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/blink.gif" style="vertical-align:middle" emoid=":blink:" border="0" alt="blink.gif" /><!--content-->
You can use the PHP variable $REMOTE_ADDR (which pulls it from the HTTP headers) to display the remote users IP address.<br /><br />For example:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><?php echo $REMOTE_ADDR; ?><!--c2--></div><!--ec2--><br /><br />You could always write that to a file too.<!--content-->
<!--quoteo(post=164011:date=Jan 23 2006, 03:14 PM:name=TCH-MikeJ)--><div class='quotetop'>QUOTE(TCH-MikeJ @ Jan 23 2006, 03:14 PM) <a href="http://www.totalchoicehosting.com/forums/index.php?act=findpost&pid=164011"><img src='http://www.totalchoicehosting.com/forums/style_images/1/post_snapback.gif' alt='*' border='0' /></a></div><div class='quotemain'><!--quotec-->You can use the PHP variable $REMOTE_ADDR (which pulls it from the HTTP headers) to display the remote users IP address.<br /><br />For example:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><?php echo $REMOTE_ADDR; ?><!--c2--></div><!--ec2--><br /><br />You could always write that to a file too.<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br /> <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/thumbup.gif" style="vertical-align:middle" emoid=":thumbup:" border="0" alt="thumbup.gif" /> you rock! thanks!<!--content-->
 
Back
Top