talira

PHP Curl Class

Object-oriented wrapper around PHP's cURL extension for HTTP requests

open sourceUnlicensefree

PHP Curl Class wraps PHP's cURL extension in an object-oriented API for sending HTTP requests and calling web APIs. It sets headers and cookies, decodes JSON and XML responses, retries failed requests through a retry decider, downloads files (including a fast download over several connections), and runs requests in parallel with callbacks through its MultiCurl class.

Problems it solves

  • send HTTP requests from PHP without writing raw curl_setopt calls
  • run many HTTP requests in parallel from a PHP script
  • download a large file in PHP over several connections

Features

  • GET, POST, PUT, PATCH, DELETE and other HTTP methods
  • headers and cookies
  • JSON and XML response decoders
  • retries with a configurable retry decider
  • file downloads, including fast downloads over several connections
  • parallel requests with callbacks through MultiCurl

Alternatives

The same job

These do what PHP Curl Class does.

  1. Guzzle PHP HTTP client
  2. Buzz (PHP HTTP client) PHP's lightweight HTTP client
  3. HTTPlug HTTP client abstraction and plugins for PHP

Compare PHP Curl Class with the top 3