Jump to content

Archived

This topic is now archived and is closed to further replies.

spandauforum

PHP script+proxy ip address

Recommended Posts

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. :)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.