PHP模拟http请求
摘要:Phpclient 库当服务器后台准备向另一台服务器发送请求时,我们可以使用使用php模拟http请求。方法如下:1、使用httpclient库的方式;2、用socket方式。一、使用httpclient类库a)使用httpclient类库,可以去官方下载最新的类库,官方地址为:http://scripts.incutio.com/httpclient/index.phpb) 静态方法获取网页:$pageContents = HttpClient::quickGet(http://example.com/)c) Get方法获取:$client = new HttpClient(example.
阅读全文
posted @ 2012-11-27 11:43