bulton-fr/call-curl

This package is abandoned and no longer maintained. The author suggests using the guzzlehttp/guzzle package instead.

Lib to simply use curl with PHP

1.0.1 2016-06-10 00:00 UTC

This package is auto-updated.

Last update: 2019-08-17 02:39:09 UTC


README

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