Curl.class.php如何实现高效长尾词查询?
- 内容介绍
- 文章标签
- 相关推荐
本文共计90个文字,预计阅读时间需要1分钟。
php
public function __construct($url) { $this->url=$url; }
public function setMethod($method) { $this->method=$method; }
public function setHeaders($headers) { $this->headers=$headers; }
public function setBody($body) { $this->body=$body; }
public function send() { $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, $this->url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->method); curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $this->body); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response=curl_exec($ch); curl_close($ch); return $response; }}?>
Curl.class.php本文共计90个文字,预计阅读时间需要1分钟。
php
public function __construct($url) { $this->url=$url; }
public function setMethod($method) { $this->method=$method; }
public function setHeaders($headers) { $this->headers=$headers; }
public function setBody($body) { $this->body=$body; }
public function send() { $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, $this->url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->method); curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $this->body); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response=curl_exec($ch); curl_close($ch); return $response; }}?>
Curl.class.php
