我正在使用http请求废弃网页。所以我使用以下代码
$this->rq = new HTTP_Request();
$this->rq->addHeader(
'User-Agent',
'Mozilla/6.0 (Windows; U; Windows NT 6.0; ja; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1 (.NET CLR 3.5.30729)'
);
$this->rq->addHeader('Keep-Alive', 115);
$this->rq->addHeader('Connection', 'keep-alive');
$this->rq->setURL('my url');
$this->rq->sendRequest();
所以现在我需要将proxy ip发送到此请求调用中。
答案 0 :(得分:1)
你试过$this->rq->setProxy(<proxy hostname>, <optional proxy port>, <optional username>, <optional port> );
吗?