cURL wrapper for PHP applications.

Installs: 21 424

Dependents: 1

Suggesters: 0

Stars: 9

Watchers: 2

Forks: 274

Open Issues: 0


2.2.1 2014-09-17 19:19 UTC


Work with remote servers via cURL much easier than using the native PHP bindings.

Build Status Dependencies Status Coverage Status SensioLabsInsight

Latest Stable Version Total Downloads License


  1. PHP 5.3+
  2. libcurl


  • POST/GET/PUT/DELETE requests over HTTP
  • HTTP Authentication
  • Follows redirects
  • Returns error string
  • Provides debug information
  • Cookies


Using Composer

Just add the following to the require section your composer.json file:

"bca/curl": "2.*"

Then execute composer install to pull down the latest release.

Package details can be found at https://packagist.org/packages/bca/curl.

Manually via Github

You may download a specific version from https://github.com/brodkinca/BCA-PHP-CURL/tags or visit the main repository at https://github.com/brodkinca/BCA-PHP-CURL/tree/master to download unreleased code or pull down a copy via git.


This library will be maintained under the Semantic Versioning guidelines.

Releases will be numbered with the following format:


And constructed with the following guidelines:

  • Breaking backward compatibility bumps the major (and resets the minor and patch)
  • New additions without breaking backward compatibility bumps the minor (and resets the patch)
  • Bug fixes and misc changes bump the patch

Composer users who would like more granular control over upgrades should restrict their installation to patch updates only using this require key:

"bca/curl": "2.1.*"

For more information on SemVer, please visit http://semver.org/.


Simple requests can be constructed with just a URL and a method.

$request = new CURL('http://example.com/');
$response = $request->get();

More complex requests build upon that concept by adding methods to the request.

$request = new CURL('http://example.com/');
$response = $request
	->param('aaa', 'bbb')
	->param('xxx', 'yyy')

echo $response;

Advanced requests can be built by adding even more methods.

$request = new CURL('http://example.com/');
$response = $request
    ->param('aaa', 'bbb')
    ->param('xxx', 'yyy')
    ->option(CURLOPT_PROXY, '')
    ->auth('username', 'password', 'digest')

echo $response;