Skip to content

liuchuang2007/ahttp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 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

Languages

  • C 84.2%
  • M4 7.7%
  • PHP 6.7%
  • JavaScript 1.4%