3
Contributors
8
Replies
12
Views
7 Years
Discussion Span
Last Post by Manuz
0

CURL is probably the easiest solution. Here is an example using cURL. You can read more about it here.

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.example.com');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($ch, CURLOPT_PROXY, 'fakeproxy.com:1080');
curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'user:password');
$data = curl_exec();
curl_close($ch);
0

I was using a proxy ip instead of the domain name. But it does not work for me.

0

I could never get it to work myself, but as far as I know, this is the only option there is. Let me know if you can get it to work.

0

Hey,

1. What is the result that you got?
2. Add

$data = curl_exec() or die("Curl exe failed");

to check out the error.
3. Do print_r($data); and look at the response.

0

The following is the code that i had used

$ch = curl_init();
       curl_setopt($ch, CURLOPT_URL, 'http://www.myurl.com');
       curl_setopt($ch, CURLOPT_HEADER, 1);
       curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
       curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
       curl_setopt($ch, CURLOPT_PROXY, '60.217.232.51:80');
      //curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'user:password');
      $data = curl_exec($ch) or die("Curl exe failed");
      curl_close($ch);

I got the output "Curl exe failed"

Edited by jobykjoseph: n/a

0

Hey,
Just try this,

$ch = curl_init();  
	  curl_setopt($ch, CURLOPT_URL, "http://www.google.com");  
	  curl_setopt($ch, CURLOPT_VERBOSE, 1);  
	  curl_setopt($ch, CURLOPT_PROXY, '***.***.*.***:****');
 
       // Turn off the server and peer verification (TrustManager Concept).  
       curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);  
       curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);  
     
       curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
       curl_setopt($ch, CURLOPT_POST, 1);  
       // Get response from the server.  
       $httpResponse = curl_exec($ch) or die("Curl exe failed");
0

When i use this code after making necessary changes in the proxy, there is no output on my browser. But my proxy is working properly when it is used in my browser.

Edited by jobykjoseph: n/a

0

So now the curl function is executed.Now replace the url with ur one and do the rquirements.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.