2017 © Pedro Peláez
 

library curl-packs

Curl wrapper object in php

image

rakavai/curl-packs

Curl wrapper object in php

  • Thursday, February 25, 2016
  • by rakavai
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

curl-lib-php

Curl wrapper in php. Multiple execution is also possible with CurlMulti in this repo., (*1)

Composer

composer require curl/curl, (*2)

Quick Start and Examples

use CurlPacks\CurlOne;
$curl = new CurlOne("example.com");
$curl->execute(); //Default method is 'get'
$resposeBody = $curl->getBody();
$curl = new CurlOne("http://example.com");
$curl->setPostMethod();
$curl->setData(array(
  'name'=>'Rakibul Hasan'
));
$curl->setData('role',"Author");
$curl->execute();
$resposeBody = $curl->getBody();

```php $curl = new CurlOne("example.com"); $curl->execute(); $curl->setCookies("Key","Value"); $curl->setCookies("anotherKey=anotherWay"); $ccurl->setHeader("Cache-Control: max-age=0"); $resposeBody = $curl->getBody(); $resposeCookies=$curl->getCookiesWithKey() //Get all cookeis in array with key value, (*3)



##For multi executable curl ```php $allCurl = array(); for ($index = 0; $index < 10; $index++) { $allCurl[] = new CurlOne("example.com")->setPostMethod(); } $multiCurl = new CurlMulti($allCurl); $multiCurl->executeAllCurlObject(); foreach ($multiCurl->getAllCurlOneObj() as $key => $aCurl) { echo $aCurl->getWholeData().'\n'; //any CurlOne method }

The Versions

25/02 2016

dev-master

9999999-dev https://github.com/rakavai/curl-lib-php

Curl wrapper object in php

  Sources   Download

The Requires

  • php >=5.3.0

 

by Rakibul Hasan

curl dot http

24/02 2016

1.0.0

1.0.0.0 https://github.com/rakavai/curl-lib-php

Curl wrapper object in php

  Sources   Download

The Requires

  • php >=5.3.0

 

by Rakibul Hasan

curl dot http