From e41ff9572d47b1507890e61b0b311ab0fd9a52fb Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 31 Mar 2020 12:02:43 +0200 Subject: Tumblr provider class --- providers/Tumblr.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 providers/Tumblr.php diff --git a/providers/Tumblr.php b/providers/Tumblr.php new file mode 100644 index 0000000..680eaf6 --- /dev/null +++ b/providers/Tumblr.php @@ -0,0 +1,44 @@ +__getUserAgent()); + curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); + curl_setopt($ch, CURLOPT_ENCODING, ''); + curl_setopt($ch, CURLOPT_TIMEOUT, 20); + $page = curl_exec($ch); + curl_close ($ch); + return $page; + } + + protected function _fetchItems() { + $page = $this->__getHttpContent($this->_feedUrl); + $this->_feedXml = new \SimpleXMLElement($page); + return $this->_parseFeedContent($this->_feedXml); + } + +} + +?> -- cgit v1.2.3