O'Reilly logo

Core PHP Programming, Third Edition by Leon Atkinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

10.4. Curl

Daniel Stenberg leads the Curl project, which aims to handle interpreting URLs and fetching data from them. PHP uses the Curl library to provide this functionality to your scripts. A typical session involves creating a Curl resource with curl_init, setting options with curl_setopt, and executing the request with curl_exec. Instead of a large set of functions, the Curl extension uses a small set of functions paired with a large set of constants used with curl_setopt.

You can learn more about Curl at its home page: <http://curl.haxx.se/>.

Recently, the Curl project added the so-called multi-interface. PHP includes support for these functions, but keep in mind their relative newness.

void curl_close(resource curl)

Use curl_close to free ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required