spandauforum Posted July 27, 2005 Share Posted July 27, 2005 is there a php function, wherein i can set a proxy ip address to be used, in order to run my php script? Link to comment https://forums.phpfreaks.com/topic/2427-php-scriptproxy-ip-address/ Share on other sites More sharing options...
Britz Posted October 24, 2005 Share Posted October 24, 2005 i had same problem not 2 long ago i read the manual and figured it out http://www.php.net/manual/en/wrappers.http.php http://www.php.net/manual/en/function.stre...text-create.php http://www.php.net/manual/en/function.fopen.php if you look at those 3 pages from the manual you can form this example: at the same time i was looking how to connect through proxy i was looking how to send a cookie aswell so if you want cookie its in example also <?php $contextz['http']['proxy'] = "tcp://localhost:5865"; $contextz['http']['header'] = "Cookie: bla=123"; //if you want you can throw some cookies this way $contextz = stream_context_create($contextz); $filehandle = fopen("http://localhost/index.php", "r", false, $contextz); ?> and there you are enjoy. Link to comment https://forums.phpfreaks.com/topic/2427-php-scriptproxy-ip-address/#findComment-9076 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.