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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:28:03+00:00 2026-06-10T21:28:03+00:00

I am using the PHP and parsing url content from web and I know

  • 0

I am using the PHP and parsing url content from web and I know two method are there for that file_get_contents(url) and curl. I know we have more option with curl so i am using that But i just wanted to know the process behind the curl. How it works when we make a curl request from scrach in brief

  • 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-10T21:28:05+00:00Added an answer on June 10, 2026 at 9:28 pm

    The PHP cURL package just exposes the cURL/libcurl API (which are written in C) in PHP. cURL is really useful for moving data across all sorts of protocols, and has a lot of nice options. On the other hand, file_get_contents is one of the base PHP file operations, and it relies on the kernel to try to find the resource requested. In general, cURL will be a better choice, though often it takes a few more lines of code. One issue with file_get_contents() is that in some cases the connection is left open after the request is made, so the function call will block the script until the request times out and you may see a lot of lag.

    References:

    http://php.net/manual/en/book.curl.php

    http://en.wikipedia.org/wiki/CURL

    http://www.php.net/manual/en/ref.filesystem.php

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

Sidebar

Related Questions

I am parsing xml file from url(in code below), using file_get_contents() function, and simpleXML,
Im parsing the source of a website and Im using this regex: /page\.php\?id\=([0-9]*)\\>(.*)\<\/a\>\<\/span\>/.match(self.agent.page.content) self.agent.page.content
Scenario: Sending XML, generated using php, via cURL to an external server for parsing.
I have problems parsing a atom facebook feed. Using: PHP's DOMDocument. Errors: Warning: DOMDocument::loadXML():
I have noticed that cURL in PHP returns different data when told to output
so I'm using CURL to replace the file_get_contents and get_meta_tags functionality in PHP: <?php
Hi i'm parsing an XML file using PHP to create another XML file in
I'm passing to perl from php using escapeshellarg system(perl -e ' . escapeshellarg($inp) .
I'm using the combination of json_encode (PHP) and JSON.parser (Javascript from json.org) for passing
I'am currently parsing in a twitter tweets by geocode and displaying them using php.

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.