/call-curl

[Abandoned] Lib to simply use curl with PHP ; You can use guzzle instead

Primary LanguagePHPGNU Lesser General Public License v3.0LGPL-3.0

CallCurl

Lib to simply use curl with PHP

Build Status Scrutinizer Code Quality Coverage Status

Install with composer

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

Use in your code

### 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