简单安装:
pear install HTTP_Request2

使用例子:

 <?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2('http://localhost/', HTTP_Request2::METHOD_GET);
try {
$response = $request->send();
if (200 == $response->getStatus()) {
echo $response->getBody();
} else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
} catch (HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
?>

详情:http://pear.php.net/manual/en/package.http.http-request2.intro.php

最新文章

  1. Atitit MATLAB 图像处理 经典书籍attilax总结
  2. sql 补齐字段位数
  3. 9.2.4 .net core 通过ViewComponent封装控件
  4. weiphp布署在sina sae图片显示不了问题
  5. iOS开发之 用第三方类库实现轮播图
  6. js中获取样式的俩种方法 style.color和style[&#39;color&#39;] 区别
  7. Python中的日志管理Logging模块
  8. Velocity源码分析
  9. subllime text 创建可复用的代码片段
  10. Linq to SQL -- Insert、Update、Delete
  11. scrapy meta信息丢失
  12. 从Excel表中导入数据时日期格式的验证问题解决
  13. eos开发(三)使用cleos命令行客户端操作EOS——关于钱包wallet和账户account
  14. TCP的三次握手和四次挥手图解
  15. LeetCode Best to buy and sell stock
  16. 集成源码深度剖析:Fescar x Spring Cloud
  17. effective C++学习二(仅供个人学习记录,本文摘录effective C++)
  18. Memcached理解笔2---XMemcached&amp;Spring集成
  19. scrapy的简单使用
  20. Lucene的数值索引以及范围查询

热门文章

  1. WebView的应用 持续积累
  2. 360开源的类Redis存储系统:Pika
  3. C++ stringstream介绍,使用方法与例子
  4. 说说log4cplus
  5. MS OFFICE 2010破解版安装
  6. innodb对update的处理
  7. Fluent Validation For .NET
  8. HTML5标签及使用方法描述
  9. iOS 获取系统相册数据(不是调系统的相册)
  10. Java快速教程