Download the PHP package phpcurl/curlwrapper without Composer

On this page you can find all versions of the php package phpcurl/curlwrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package curlwrapper

CurlWrapper for PHP

Total Downloads Latest Stable Version Travis Build SensioLabs Insight

The simplest OOP-style wrapper for the standard php curl functions with no external dependencies. The main purpose is to make code that uses curl calls testable. We do it by injecting the Curl object as a dependency instead of calling curl functions directly.

Hard-coded dependencies. Not testable.

Testable code. Curl object is injected, so can be easily mocked in PHPUnit.

Install

Via composer: $ composer require "phpcurl/curlwrapper"

Basic usage examples. Classic vs OOP style

Curl

Classic OOP
$h = curl_init($url) $curl = new Curl(); $curl->init($url)
curl_close($h) unset($curl)
$e = curl_errno($h) $e = $curl->errno()
$e = curl_error($h) $e = $curl->error()
$i = curl_getinfo($h, $opt) $i = $curl->getInfo($opt)
curl_setopt($h, $opt, $val) $curl->setOpt($opt, $val)
curl_setopt_array($h, $array) $curl->setOptArray($array)
curl_version($age) $curl->version($age)
curl_strerror($errornum) $curl->strerror($errornum)
$h2 = curl_copy_handle($h) $curl2 = clone($curl)
$result = curl_exec($h) $result = $curl->exec()
$res = curl_pause($h, $mask) $res = $curl->pause($mask)
$res = curl_escape($h, $str) $res = $curl->escape($str)
$res = curl_unescape($h, $str) $res = $curl->unescape($str)

CurlMulti

Classic OOP
curl_multi_init() $cm = new CurlMulti(); $cm->init()
curl_multi_close($h) unset($cm)
$i = curl_multi_add_handle($mh, $ch) $i = $cm->add($curl)
$i = curl_multi_remove_handle($mh, $ch) $i = $cm->remove($curl)
$i = curl_multi_exec($mh, $running) $i = $cm->exec($running)
$s = curl_multi_getcontent($ch) $s = $cm->getContent($curl)
$a = curl_multi_info_read($mh, $msgs) $a = $cm->infoRead($msgs)
$i = curl_multi_select($mh, $timeout) $i = $cm->select($timeout)
$r = curl_multi_setopt($h, $opt, $val) $r = $cm->setOpt($opt, $val)

CurlShare

Classic OOP
curl_share_init() $cs = new CurlShare(); $cs->init()
curl_share_close($h) unset($cs)
$r = curl_multi_setopt($h, $opt, $val) $r = $cs->setOpt($opt, $val)

All versions of curlwrapper with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phpcurl/curlwrapper contains the following files

Loading the files please wait ....