Forum Moderators: coopster

Message Too Old, No Replies

Getting a referal ip

from a scripted query.

         

mack

3:49 am on Aug 13, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



A script I have written delivers an rss feed to a web based parser on another server. The server with the parse makes a request for the feed.

The script on my server then has to receive the ip of the server issuing the request.

$ip = $_SERVER["REMOTE_ADDR"];

The above code works about 50+% of the time but not always. Is there a bullet proof way of getting the referal ip?

Thanks in advance.

Mack.

John Carpenter

11:47 am on Aug 13, 2005 (gmt 0)

10+ Year Member



The above code works about 50+% of the time but not always.

IMO, it's quite strange that it doesn't work 100% of the time. It should. Did you find out at least some circumstances under which it doesn't work? It could also be a bug in Apache/PHP.

FiRe

2:18 pm on Aug 13, 2005 (gmt 0)

10+ Year Member



If there using a proxy you can get their IP address, but not if its a highly anonymous proxy server!
Take a look at the examples on [php.net...]

mack

6:35 pm on Aug 13, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



It's very wierd to say the least.

I have made 2 installs. One on Linux and one in a windows server. Both worked.

I dont know if proxy info woudl come into play because it is the requesting server i am interested in.. Not browser.

Mack.