Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8728323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:36:46+00:00 2026-06-13T08:36:46+00:00

I have this code that works fine on my local server but doesn’t work

  • 0

I have this code that works fine on my local server but doesn’t work on a live server.
I’m trying to scrap without getting blocked.

If a proxy gets blocked by the remote server then how come it’s working on my local server?

function curl_se($set_url,$proxy){

    $ch = curl_init($set_url);
    //set options
    $header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,"; 
    $header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"; 
    $header[] = "Cache-Control: max-age=0"; 
    $header[] = "Connection: keep-alive"; 
    $header[] = "Keep-Alive: 300"; 
    $header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; 
    $header[] = "Accept-Language: en-us,en;q=0.5"; 
    $header[] = "Pragma: "; //browsers keep this blank.
    //set options
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
    curl_setopt($ch, CURLOPT_USERAGENT,"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3");
    curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate'); 
    curl_setopt($ch, CURLOPT_HTTPHEADER, $header); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 0);
    curl_setopt($ch, CURLOPT_PROXY, $proxy);
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    $result = curl_exec($ch);
    echo "<pre>";
    print_r(curl_getinfo($ch));
    echo "</pre>";
    if(curl_errno($ch))
        return false;
    else
        return $result; 
}

Looping one proxy on each curl request.

$proxy = array(
    "91.83.216.186:8081",
    "190.116.88.11:8080",
    "117.102.9.116:8080",
    "188.165.4.38:3128",
    "187.120.209.10:8080",
    "190.186.50.32:3128",
    "190.108.83.30:8080",
    "190.130.230.149:8080",
    "130.180.18.24:8275",
    "178.33.181.120:8080"
);

On the live server I’m getting curl error 7 (CURLE_COULDNT_CONNECT)

I’m stuck, it’s the same code same URL working fine locally.

Update: I figured out that it’s something to do with proxy. I tried hundreds of them but none is working on live server getting curl error no 7; tried different website URLs too.
while same proxy and URLs are working on my local server.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:36:48+00:00Added an answer on June 13, 2026 at 8:36 am

    Try working proxies. Check here (codepad.viper-7.com/xzm8Au) your server is running just fine.
    When you use anonymous proxy, then the remote(destination) server can’t see or block your real ip.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code that works in a unit test but doesn't work when
I have this piece of code that works fine in subsonic 2.2, I migrated
I have this code that works well: {livre:empty_name} $.ajax({ url: sent.php, type: post, dataType:
I have the following code: Bear in mind that while this code works on
I have this piece of code that does not work: public CartaoCidadao() { InitializeComponent();
I have the this code that will create excel file and work sheet then
I have this code that runs but never stops. class A { public static
Edit: showed my exact web.config code. I have a MVC3 project that works fine
I have this code that I've edited: http://pastebin.com/vrqHek6S I've put in comments where I
I have this code that reads from XML file. It gets five strings (groupId,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.