Jump to content

Why can't cURL manage a connection?


MySQL_Narb

Recommended Posts

I have a script that tests a compiled list of HTTP proxies to see if they can connect to a specified website. If they connect, and the correct page results are returned, they are added to a list of working proxies; however, even if I test about 30,000 proxies at a time....none of them come back working.

 

Yet, when I check a random selection of them in a proxy checker, quite a large portion of them come back working.

 

3EJxn.png

3EJDo.png

 

Even when I specify the proxy type to HTTP, cURL never manages to make a connection to the webpage and return the webpage contents.

 

Note: I am setting a user-agent.

 

As you can see, no results are returned. The contents of the webpage, if any are retrieved, should be posted in the textbox.

 

3EK4z.png

Link to comment
https://forums.phpfreaks.com/topic/280223-why-cant-curl-manage-a-connection/
Share on other sites

  On 7/21/2013 at 9:24 AM, PaulRyan said:

Bump all you want, you need to post your code before anyone will think about helping.

 

Not sure how this is going to help, but O.K.

if(!in_array($proxy_split[1], $this->banned_ports)){
                $checked[] = $proxy;
                
                $this->curl->addSession('http://www.google.com', array(
                    CURLOPT_PROXY => $proxy,
                    CURLOPT_FOLLOWLOCATION => true,
                    CURLOPT_PROXYTYPE => CURLPROXY_HTTP,
                    CURLOPT_TIMEOUT => 120,
                    CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1',  
                    CURLOPT_RETURNTRANSFER => true
                 ));
            }

Have you tried accessing a site other than google?

 

Have you verified that your server does not have a firewall blocking the ports/ips?

 

Have you tried the code on a different server?

 

Are you sure you're using your class correctly? Try the raw curl functions.

Archived

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

×
×
  • Create New...

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.