Download the PHP package graceas/php-simple-curl-wrapper without Composer
On this page you can find all versions of the php package graceas/php-simple-curl-wrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download graceas/php-simple-curl-wrapper
More information about graceas/php-simple-curl-wrapper
Files in graceas/php-simple-curl-wrapper
Download graceas/php-simple-curl-wrapper
More information about graceas/php-simple-curl-wrapper
Files in graceas/php-simple-curl-wrapper
Vendor graceas
Package php-simple-curl-wrapper
Short Description This simple CURL wrapper. Allows the processing of multiple Request's asynchronously.
License MIT
Package php-simple-curl-wrapper
Short Description This simple CURL wrapper. Allows the processing of multiple Request's asynchronously.
License MIT
Please rate this library. Is it a good library?
Informations about the package php-simple-curl-wrapper
SimpleCurlWrapper
This simple CURL wrapper. Allows the processing of multiple Request's asynchronously.
Installation
Through composer:
"require": {
...
"graceas/php-simple-curl-wrapper": "v1.5.4"
...
}
Usage
$requests = [
(new \SimpleCurlWrapper\SimpleCurlRequest())
->setUrl('http://ip-api.com/json?r=1')
->setMethod(\SimpleCurlWrapper\SimpleCurlRequest::METHOD_GET)
->setHeaders([
'Accept: application/json',
'User-Agent: simple curl wrapper',
])
->setOptions([
CURLOPT_FOLLOWLOCATION => false,
])
->setCallback('loadCallback'),
(new \SimpleCurlWrapper\SimpleCurlRequest())
->setUrl('http://ip-api.com/json?r=2')
->setMethod(\SimpleCurlWrapper\SimpleCurlRequest::METHOD_GET)
->setHeaders([
'Accept: application/json',
'User-Agent: simple curl wrapper',
])
->setOptions([
CURLOPT_FOLLOWLOCATION => false,
])
->setCallback('loadCallback'),
];
$wrapper = new \SimpleCurlWrapper\SimpleCurlWrapper();
$wrapper->setRequests($requests);
$wrapper->execute(2);
function loadCallback(\SimpleCurlWrapper\SimpleCurlResponse $response) {
print_r($response->getRequest()->getUrl());
print_r($response->getHeadersAsArray());
print_r($response->getBodyAsJson());
}
All versions of php-simple-curl-wrapper with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.5.9
ext-curl Version *
ext-json Version *
ext-curl Version *
ext-json Version *
The package graceas/php-simple-curl-wrapper contains the following files
Loading the files please wait ....