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

  • Home
  • SEARCH
  • 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 8002259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:18:17+00:00 2026-06-04T16:18:17+00:00

I am using multi curl to fetch data from remote site. My script is

  • 0

I am using multi curl to fetch data from remote site. My script is like

foreach ($urls as $i => $url) {
            $ch[$i] = curl_init($url['url']);
            curl_setopt($ch[$i], CURLOPT_TIMEOUT, 0);
            curl_setopt($ch[$i], CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch[$i], CURLOPT_CONNECTTIMEOUT, 0);
            curl_setopt($ch[$i], CURLOPT_SSL_VERIFYPEER, false);
            curl_multi_add_handle($multiCurlHandler, $ch[$i]);
}

It returns me 403 forbidden in response.

Thanks in advance for suggestions and comments.

  • 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-04T16:18:18+00:00Added an answer on June 4, 2026 at 4:18 pm

    Just try by adding two lines for User agents, and see if it works or not.
    Some servers not accept the requests from scripts, it depends on user agents.

    // line 1
    $agent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)';
    
    foreach ($urls as $i => $url) {
        $ch[$i] = curl_init($url['url']);
        curl_setopt($ch[$i], CURLOPT_TIMEOUT, 0);
        curl_setopt($ch[$i], CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch[$i], CURLOPT_CONNECTTIMEOUT, 0);
    
        // line 2
        curl_setopt($ch[$i], CURLOPT_USERAGENT, $agent);
    
        curl_setopt($ch[$i], CURLOPT_SSL_VERIFYPEER, false);
        curl_multi_add_handle($multiCurlHandler, $ch[$i]);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using a 'rolling' cURL multi implementation (like this SO post , based on
I'm using curl multi API for multiple curl requests. first I'm using a single
I'm using a multi dimensional array in php, I would like to know how
I am using the CURL c++ api to get quotes from Yahoo's financial API.
So I've been using CURL to get some portions of remote images....but then depending
Does somebody have a working example of using WWW::Curl::Multi ?
I've been building PHP tools with a MySQL backend. Using multi-curl I can run
I am using Multi-line TextBox through which users will be able to enter data
I am using curl, I am wondering how would I send post/submit data on
Now i am studying how to fetch data from website as fast as possible.

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.