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 6237455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:01:58+00:00 2026-05-24T11:01:58+00:00

A rather simple scenario; I’ve got an array of user inputted url’s (could be

  • 0

A rather simple scenario; I’ve got an array of user inputted url’s (could be any number from 1 to 1000+), and I want to perform file_get_contents(); on all of them, and then if possible have all that binded/bound into a single variable, so that preg_match_all(); can be performed on that variable to pick up specific strings.

I’ve heard that using cURL might be another option, however I’ve got very little knowledge on the function of cURL.

  • 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-05-24T11:01:59+00:00Added an answer on May 24, 2026 at 11:01 am

    Actually this sounds like a job for iterating over the URLs:

    $urls = array('http://www.example.com/');
    $allTexts = '';
    foreach($urls as $url)
    {
        $text = file_get_contents($url);
        if (false === $text)
            continue;
    
        // proceed with your text, e.g. concatinating it:
        $allTexts .= $text;
    }
    

    However if you have thousand URLs, take your time. curl offers to request multiple URLs at once (multi request feature) however, with thousands of URLs that does not scale as well.

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

Sidebar

Related Questions

Ok, this is rather simple, but from what I've seen… you can only use
I've written a rather simple(ish) stack implementation that would automatically grow its internal array
We have a rather simple site (minimal JS) with plain html and CSS. It
I am trying to create a rather simple effect on a set of images.
I need to construct some rather simple SQL, I suppose, but as it's a
I searched google but couldn't find an answer to this rather simple question. I
The code is rather long yet simple: 100 leaky JavaScript objects are created. 10
Why would you do an automatic HTML post rather than a simple redirect? Is
Heavy emphasis on simple. I've never made an installer and I'd rather not have
A rather odd experience. Using the latest PDK (v7.3) from ActiveState, I used perlctrl

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.