PHP Classes

http class with proxies

Recommend this page to a friend!

      PHP HTTP protocol client  >  All threads  >  http class with proxies  >  (Un) Subscribe thread alerts  
Subject:http class with proxies
Summary:can't get http_class to work with proxies
Messages:5
Author:Joeri Thissen
Date:2007-01-12 20:06:37
Update:2007-01-16 02:59:19
 

  1. http class with proxies   Reply   Report abuse  
Picture of Joeri Thissen Joeri Thissen - 2007-01-12 20:06:37
I'm trying to set up http_class with a proxy, but I keep getting
110 could not connect to the host "[proxy ip]"

I tested it with multiple proxies which all worked perfectly on my own pc, but with http_class I can't get it to work.

I added the proxy ip and port in the variable declaration of http_class instead of using the arguments array, might that be the problem? or did I forget a variable? (the proxies I tested don't need a username/ password)

var $proxy_host_name="61.135.153.116";
var $proxy_host_port="8080";

Thanks in advance!

  2. Re: http class with proxies   Reply   Report abuse  
Picture of Joeri Thissen Joeri Thissen - 2007-01-12 20:08:16 - In reply to message 1 from Joeri Thissen
also, I forgot to add that http_class does work without proxies.

  3. Re: http class with proxies   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-01-12 20:41:04 - In reply to message 1 from Joeri Thissen
That error means that the connection to the proxy is being refused, most likely because there is no proxy listening in the specified port of the proxy address you specified. Make sure you are specifying the correct proxy address and port.

  4. Re: http class with proxies   Reply   Report abuse  
Picture of Joeri Thissen Joeri Thissen - 2007-01-14 12:55:35 - In reply to message 3 from Manuel Lemos
isn't there any other setting I might have forgotten? I tried it with lots of proxies which all work on my pc, but with http class they all give the same error.

  5. Re: http class with proxies   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-01-16 02:59:19 - In reply to message 4 from Joeri Thissen
Actually you should set the proxy server as in the test_http.php example.

If it still does not work. Just let me know what is the proxy server IP, port, user name, and password (if needed), so I can try to reproduce your problem.