Forum Moderators: coopster

Message Too Old, No Replies

Including user's IP address in code

         

Black_Dog

9:06 pm on Jul 7, 2006 (gmt 0)

10+ Year Member



Hi all,

I hope some nice PHP guru can answer my question. I am a programmer but I don't know PHP so please go easy on me! :)

I am trying to do a PHP include as follows:
<?php include("http://www.mysite.com/mypage.html?ipaddress=IPADDRESS");?>

I need to pass the surfer's ip address as a parameter to the include URL. What should I replace "IPADDRESS" with to accomplish this?

Any and all replies are much appreciated!

Thanks,
Barry

Sekka

9:09 pm on Jul 7, 2006 (gmt 0)

10+ Year Member



<?php include("http://www.mysite.com/mypage.html?ipaddress={$_SERVER['REMOTE_ADDR']}");?>

Love Sekka

Black_Dog

9:49 pm on Jul 7, 2006 (gmt 0)

10+ Year Member



Thank you Sekka! 8-x

B