use pre-configured http_request2 instance
[stapibas.git] / src / stapibas / Feed / PingUrls.php
index 0812f0fe11c9f85e50c7f168ff80b1db64ed6c35..7c16223156873c176b00516f6a142e80ea45f6aa 100644 (file)
@@ -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);
     }