Forum Moderators: coopster

Message Too Old, No Replies

weird IP address question for PHP experts

ip address detect

         

sabongio

7:58 pm on Jul 15, 2005 (gmt 0)

10+ Year Member



hey there

have a (possibly) tough one for you. :)

let's say i have a 2 web servers. i have a php script running on the first that uses an included PHP script that's sitting on server 2.

how can i get the script on server 2 that's sending info back to server 1 to detect the IP address of the requesting server so i can check for authorization?

i was looking at $_SERVER["REMOTE_ADDR"] but i don't think it's what i need.

any help will be very gratefully received,

thanks

sabongio

8:46 pm on Jul 15, 2005 (gmt 0)

10+ Year Member



ah.. found it. it's

gethostbyname ($SERVER_NAME);

jatar_k

8:55 pm on Jul 15, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



darn it, I knew that one ;)

glad you found it