Lib to simply use curl with PHP
Download composer
$ curl -s https://getcomposer.org/installer | php
Add call-curl repository to you composer.json
{
"require": {
"bulton-fr/call-curl": "@stable"
}
}
Execute the command
$ php composer.phar install
### Default parser : No parse data send and receive
$curl = new \bultonFr\CallCurl\CallCurl;
$curl->setUrl('http://www.github.com');
$dataReceive = $curl->runCall();
$dataHeaders = $curl->getCurlCallInfos();
### With the Json parser
$jsonParser = new \bultonFr\CallCurl\Parser\Json;
$curl = new \bultonFr\CallCurl\CallCurl($jsonParser, $jsonParser);
$curl->setUrl('http://www.github.com/api');
$dataReceive = $curl->runCall();
$dataHeaders = $curl->getCurlCallInfos();
More explications on wiki