Skip to content
/ http Public

一个可以进行http请求的php扩展,可以在进程中共享http连接

Notifications You must be signed in to change notification settings

shinezhou/http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http

一个可以进行http请求的php扩展,可以在同一个进程中共享http连接。

install

phpize
./configure
make && make install

然后把http.so加入到php.ini中

Api

function http_get($url, $timeout=1000)

  • $url get请求的url
  • $timeout 请求执行的超时时间单位毫秒(包括传输时间和连接时间)

function http_post($url, $data, $timeout=1000)

  • $url post请求的url
  • $data post参数,一个数组
  • $timeout 请求执行的超时时间单位毫秒(包括传输时间和连接时间)

function http_info()

  • 返回最近一次请求的错误信息

About

一个可以进行http请求的php扩展,可以在进程中共享http连接

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors