PHP Classes

How is it used

Recommend this page to a friend!

      Proxy Connector  >  All threads  >  How is it used  >  (Un) Subscribe thread alerts  
Subject:How is it used
Summary:Mis appears in the browser
Messages:4
Author:Fahad ALGhathbar
Date:2010-12-21 09:54:38
Update:2011-01-12 14:08:21
 

  1. How is it used   Reply   Report abuse  
Picture of Fahad ALGhathbar Fahad ALGhathbar - 2010-12-21 09:54:38
Hello

You have uploaded the files to my personal website but it did not work and shows the error to

---------------------------------
Warning: fsockopen() [function.fsockopen]: unable to connect to 127.0.0.1:9051 (Connection refused) in /home/my/public_html/proxy/proxyConnector.class.php on line 163

Array
(
[url] => http://www.google.com/
[userAgent] => Firefox/6.9 (Windows NT 7.8; en-US;)
[timeout] => 300
[proxy] => 127.0.0.1:8118
[payload] => http://www.google.com/
[return] =>
)

---------------------------------

  2. Re: How is it used   Reply   Report abuse  
Picture of Ska-Man Ska-Man - 2010-12-21 11:58:03 - In reply to message 1 from Fahad ALGhathbar
Hello,
have you used the default .ini file?

Are you sure you have a TOR proxy installed in you personal website machine?

The error is triggered when the proxy try to change TOR identity, this could caused by a miss configuration of the .ini file (eg. the control port is not the active on your system or the control password il miss configured) or by a miss configuration of the TOR proxy (could not accept connection in the control port or something different).

You can use the class without changing identity setting in the ini file:

switchIdentityAfterRequest = false

Bye

  3. Re: How is it used   Reply   Report abuse  
Picture of Barbushin Sergey Barbushin Sergey - 2011-01-02 10:40:49 - In reply to message 2 from Ska-Man
I have installed TOR and use proxyConnector, but there is empty 'return':

Array
(
[url] => http://xpart.ru/_share/ip.php
[userAgent] => Safari/6.0 (Windows 95 6.1; en-US;)
[timeout] => 300
[proxy] => 127.0.0.1:8118
[payload] => http://xpart.ru/_share/ip.php
[return] =>
)


This is strange becuase http://xpart.ru/_share/ip.php return IP address.

  4. Re: How is it used   Reply   Report abuse  
Picture of Ska-Man Ska-Man - 2011-01-12 14:08:22 - In reply to message 3 from Barbushin Sergey
Hi,
i have tryed this code:
....
include("./proxyConnector.class.php");
$connection = proxyConnector::getIstance();
$connection->launch("http://xpart.ru/_share/ip.php", null);
$data = $connection->getProxyData();
echo "<pre>";
print_r($data);
...

and the result was:
Array
(
[url] => http://xpart.ru/_share/ip.php
[userAgent] => Konqueror/4.0 (Windows 95 4.8; en-US;)
[timeout] => 300
[proxy] => 127.0.0.1:8118
[payload] => http://xpart.ru/_share/ip.php
[return] => HTTP/1.1 200 OK
Content-Length: 15
Date: Wed, 12 Jan 2011 14:02:50 GMT
Server: Apache/2.0.63-lk.d (Unix) mod_ssl/2.0.63-lk.d OpenSSL/0.9.8k mod_dp20/0.99.2 PHP/5.3.2 mod_python/3.3.1 Python/2.6.2 mod_ruby/1.2.6 Ruby/1.8.6(2007-09-24)
X-Powered-By: PHP/5.3.2
Content-Type: text/html
Connection: keep-alive

192.251.226.206
)

So i think it was a miss configuration of the config.ini or the TOR proxy.

Have you used the provided config.ini?
if yes, is the TOR programm installed correctly? maybe the port you need to use is different than 8118 (that is the default port for polipo installation).
Have you tryed using an other proxy?

Let me know if you need more help

Bye
Marco