To which IP does an Http request from a PHP script resolves?
Posted: Sun Jul 09, 2006 2:38 am
Hello,
Kinda simple question that I'm stuck with.
I have a PHP script that calls an external (3rd party - not mine) ASP service and stores the response in a simple string.
Here the code:
The problem
I need that the call for this "service.aspx" will originate from my server IP, NOT from my private user IP. This is because this service has IP restriction and is cofigured to work only if requested from my server IP.
At the moment - any invokation of "service.aspx" shows that the referral IP is my private IP.
How can I make a simple http request that will originate from my server IP, and not from the user's IP ?
Would be glad for any lead here...
Kinda simple question that I'm stuck with.
I have a PHP script that calls an external (3rd party - not mine) ASP service and stores the response in a simple string.
Here the code:
Code: Select all
$url = "http://www.someserver.com/service.aspx?p1=x&p2=y";
$xmlResponse = file_get_contents($url);I need that the call for this "service.aspx" will originate from my server IP, NOT from my private user IP. This is because this service has IP restriction and is cofigured to work only if requested from my server IP.
At the moment - any invokation of "service.aspx" shows that the referral IP is my private IP.
How can I make a simple http request that will originate from my server IP, and not from the user's IP ?
Would be glad for any lead here...