首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > PHP > 有效的HTTP客户端与PHP

有效的HTTP客户端与PHP

资 源 简 介

Efficient HTTP client. It supports functions with cookie store, keep-alive connection, http header parsing. 1.simple request a page $client = new Client ( ); $content=$client->get("http://www.caijiqi.net/"); 2.keep-alive connection $cm = new ConnectionManager ( ); $client = new Client ( $cm ); for($i=0;$i<10;$i++){ $content=$client->post("http://www.caijiqi.net/","title=test&message=request%+".$i."th"); } 3.advanced example $client = new Client ( ); $post= new HttpPost("http://www.caijiqi.net/","title=test&message=welcome%+here!"); $response=$client-execute($post); $stauts=$response->getStatus(); $length=$response->getFirstHeader("Content-Length"); $content=$response->getContent();

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP