From: Christian Weiske Date: Wed, 23 Oct 2013 19:03:15 +0000 (+0200) Subject: use pre-configured http_request2 instance X-Git-Url: https://git.cweiske.de/stapibas.git/commitdiff_plain/e2917652a721de7f62fae7b46f56ca5c2eff2f0f use pre-configured http_request2 instance --- diff --git a/src/stapibas/Feed/PingUrls.php b/src/stapibas/Feed/PingUrls.php index 0812f0f..7c16223 100644 --- a/src/stapibas/Feed/PingUrls.php +++ b/src/stapibas/Feed/PingUrls.php @@ -17,15 +17,16 @@ class Feed_PingUrls $this->log = $deps->log; $this->pbc = new \PEAR2\Services\Linkback\Client(); - - $req = new \HTTP_Request2(); + $req = $this->pbc->getRequest(); $req->setConfig( array( 'ssl_verify_peer' => false, 'ssl_verify_host' => false ) ); - $this->pbc->setRequest($req); + $headers = $req->getHeaders(); + $req->setHeader('user-agent', 'stapibas / ' . $headers['user-agent']); + $this->pbc->setDebug(true); }