Download the PHP package sinacms/multihttp without Composer
On this page you can find all versions of the php package sinacms/multihttp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package multihttp
MultiHttp
This is high performance curl wrapper written in pure PHP. It's compatible with PHP 5.4+ and HHVM. Notice that libcurl version must be over 7.36.0, otherwise timeout can not suppert decimal.
这是一个高性能的PHP封装的HTTP Restful多线程并发请求库,参考借鉴了httpful 、multirequest等优秀的代码。它与PHP 5.4和hhvm兼容。 注意,libcurl版本必须>=7.36.0,否则超时不支持小数。
## 请使用最新 Tag ( Please use the latest tag version)
Contents
- Feature
- Installation
- Usage
- Single-request
- Multi-request
- Documentation
- Request
- MultiRequest
Feature
- alias of curl option, e.g. 'timeout' equals 'CURLOPT_TIMEOUT' etc.
- Request and MultiRequest class , can be used in any combination
- graceful and efficient
Installation
You can use composer to install this library from the command line.
Usage
Single-request:
Multi-request:
Documentation
-
Request
-
option shorthand
'url' => 'CURLOPT_URL', 'debug' => 'CURLOPT_VERBOSE',//for debug verbose 'method' => 'CURLOPT_CUSTOMREQUEST', 'data' => 'CURLOPT_POSTFIELDS', // array or string , file begin with '@' 'ua' => 'CURLOPT_USERAGENT', 'timeout' => 'CURLOPT_TIMEOUT', // (secs) 0 means indefinitely 'connect_timeout' => 'CURLOPT_CONNECTTIMEOUT', 'referer' => 'CURLOPT_REFERER', 'binary' => 'CURLOPT_BINARYTRANSFER', 'port' => 'CURLOPT_PORT', 'header' => 'CURLOPT_HEADER', // TRUE:include header 'headers' => 'CURLOPT_HTTPHEADER', // array 'download' => 'CURLOPT_FILE', // writing file stream (using fopen()), default is STDOUT 'upload' => 'CURLOPT_INFILE', // reading file stream 'transfer' => 'CURLOPT_RETURNTRANSFER', // TRUE:return string; FALSE:output directly (curl_exec) 'follow_location' => 'CURLOPT_FOLLOWLOCATION', 'timeout_ms' => 'CURLOPT_TIMEOUT_MS', // milliseconds, libcurl version > 7.36.0 ,
- public static function create()
- public function endCallback()
- public function hasEndCallback()
- public function onEnd(callable$callback)
- public function uri
- public function getIni($field)
- public function addQuery($data)
- public function post($uri, array $payload = array(), array $options = array())
- public function addOptions(array $options = array())
- public function get($uri, array $options = array())
- public function send()
- public function applyOptions()
- public function makeResponse($isMultiCurl = false)
-
-
MultiRequest
- public static function create()
- public function addOptions(array $URLOptions)
- public function add($method, $uri, array $payload = array(), array $options = array())
- public function import(Request $request)
- public function sendAll()
[More]https://github.com/sinacms/MultiHttp/blob/master/usage.md
All versions of multihttp with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4.0
ext-curl Version *
lib-curl Version *
ext-curl Version *
lib-curl Version *
The package sinacms/multihttp contains the following files
Loading the files please wait ....