Page 1 of 1

connect to an external site on internet through a proxy

Posted: Thu Mar 03, 2005 4:29 am
by asj123
I am trying to connect through a proxy from intranet to a site on internet.
How is proxy support for for eks. fopen(). It seems like there is no support for this in this function.

Alternativelly, is there other function that supports connection through a proxy (requesting a xml file).

Or does anyone know a way to just configure such forwarding in Apache or php.ini?

Posted: Thu Mar 03, 2005 5:03 am
by timvw
just use http://www.php.net/curl. this will save you a lot of time...

Is there any way of setting this up in php.ini

Posted: Thu Mar 03, 2005 6:01 am
by asj123
Thanks for fast response. My problem is that the curl will require too much recoding of an application that already exists (uses fopen to request the remote xml). I was hoping there was a way to use fopen with proxy. Or if possible just configure the php.ini to farward some requests from intranet to internet (Someone gave me a tip here, but didn't know how..).

I need a faster solution. I don't have much time to fix this..

Thanks again :?

Posted: Thu Mar 03, 2005 6:18 am
by timvw
you could start reading the manual.... as there is a solution posted in the comments....

http://www.php.net/fopen