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

Edited by MySQL_Narb
Link to comment
Share on other sites

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
                 ));
            }
Edited by MySQL_Narb
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.