aboutsummaryrefslogtreecommitdiff
path: root/src/phinde/HttpRequest.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2016-02-10 14:56:20 +0100
committerChristian Weiske <cweiske@cweiske.de>2016-02-10 14:56:20 +0100
commitcd02bac646f42a0cb402ff2dc8240aa01f1f0fb8 (patch)
tree8cc7ee5d841f868e38ccc0b54d8cc6d33a852ed7 /src/phinde/HttpRequest.php
parentf67e8f0bc3f51f2d280a86a8c7cffa68d812efe1 (diff)
downloadphinde-cd02bac646f42a0cb402ff2dc8240aa01f1f0fb8.tar.gz
phinde-cd02bac646f42a0cb402ff2dc8240aa01f1f0fb8.zip
rework crawler; add atom link extraction
Diffstat (limited to 'src/phinde/HttpRequest.php')
-rw-r--r--src/phinde/HttpRequest.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/phinde/HttpRequest.php b/src/phinde/HttpRequest.php
new file mode 100644
index 0000000..e68bd84
--- /dev/null
+++ b/src/phinde/HttpRequest.php
@@ -0,0 +1,16 @@
+<?php
+namespace phinde;
+
+class HttpRequest extends \HTTP_Request2
+{
+ public function __construct($url)
+ {
+ parent::__construct($url);
+ $this->setConfig('follow_redirects', true);
+ $this->setConfig('connect_timeout', 5);
+ $this->setConfig('timeout', 10);
+ $this->setConfig('ssl_verify_peer', false);
+ $this->setHeader('user-agent', 'phinde/bot');
+ }
+}
+?>