Skip to content

wangxx2026/ahttp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

发起异步http请求的一个php扩展

依赖libevent库

install

phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-libevent=/usr/local/libevent/ --enable-ahttp

branch for_php55 for php5.5

branch master for php7

demo

$obj = new ahttp();
$obj->set_time_out(1000);
$obj->get('http://www.google.com');
$obj->post('http://example.com', array('data' => 'aaaaaa'));
$obj->get('http://example.com', array('header' => array('User-agent' => 'ahttp')));
$obj->wait_reply();
$arr = $obj->result();

返回值的顺序按发起的返回

About

一个发起异步http请求的php扩展

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published