Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

request a url through a proxy server

Status
Not open for further replies.

miraclemaker

Programmer
Oct 16, 2002
127
GB
Hi there, does anyone know how I can request a url from php (through an fopen() or whatever), but go through a proxy server?

Any help on this would be much appreciated.
 
provided you have sufficent access rights to use the proxy, the fopen() should work just fine.

If you needto specify a username and password, check out fsockopen() instead.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
cURL will also let you set all sorts of proxy options before opening a URL.
 
Must play with cURL at some point, people keep raving about it round here, I'm beginning to feel I'm missing out ...

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
It certainlly has it's place... I tinkered with it here and there until I had to connect to our companies intranet through some crappy microsoft security.... that's when it became a necessity for me.

Also it beats fopen when it comes to trapping for errors and figuring out exactly what's happened... in that way I used it to write a monitoring script which tells me when my servers can't be accessed and why not.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top