PHP coding problem (web proxy related)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
conglei
Forum Newbie
Posts: 1
Joined: Mon Dec 11, 2006 2:55 pm

PHP coding problem (web proxy related)

Post by conglei »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


i want to program in php to open a web page, say http://www.google.com
i use the following code:

Code: Select all

$page="http://www.google.com";
   $open=fopen($page, 'r') or die();
however, it doesn't open because i use "automatic configuration script" for accessing web pages. the purpose of it is to find some web proxy to use given the url. it's located under 'tools'-->'internet options'-->'connections'-->'lan settings'-->'automatic configuration'. i have a link provided for the address of automatic configuration script.

so, what can i do? THANKS!!!

:? :?


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

If your php version is recent enough you can attach a proxy context option.
see http://de2.php.net/manual/en/wrappers.h ... #AEN271730
Post Reply