Looks like a simple code, but I had problems doing it.
The php script should call a remote aspx service on another domain -> www.anotherdomain.com/service.aspx?p1=x&p2=y
This "service.aspx" will only execute if this request is sent from a specific IP. In other words, this service has IP restriction, for security matters.
The returned XML response notifies if the referring IP is authorised or not.
I've configured my site's IP as an authorised IP.
To invoke the service I've used a simple implode() statement:
$xmlAnswer = implode('', file($URL));
Where $URL is the URL of the service call -> http://www.anotherdo....aspx?p1=x&p2=y
I get an error response of Invalid IP.
Which I suppose means that the call for the remote service is invoked from the viewer IP (browser page), and not from the machine IP.
Any Ideas how to fix this?
Thanks in advance!