tags:

views:

28

answers:

2

I have to fetch content of some urls by using proxies from a list.

All proxies requires authentication (i have username and passwords as well).

Problem is i don't have curl installed on server , so can't use curl.

I tried using sockets but having problem using that.

Any help is appreciated .

A: 

try using this:

$text = file_get_contents('http://www.example.com/');

or

$text = file_get_contents('http://user:[email protected]/');
budinov.com
A: 

Use stream_context_create with the proxy option (see here for details: http://www.php.net/manual/en/context.http.php ). Then you can access the file using the standard functions fopen, file_get_contents .

Alex