PATH:
home
/
letacommog
/
entrepro
/
wp-content
/
plugins
/
content-egg
/
application
/
libs
/
rss
<?php namespace ContentEgg\application\libs\rss; use ContentEgg\application\libs\RestClient; /** * RssParser class file * * @author keywordrush.com <support@keywordrush.com> * @link http://www.keywordrush.com/ * @copyright Copyright © 2015 keywordrush.com * */ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'RestClient.php'; class RssParser extends RestClient { /** * @var array Response Format Types */ protected $_responseTypes = array( 'xml' ); /** * Constructor * @param string $responseType */ public function __construct() { $this->setResponseType('xml'); } public function search($query, $uri) { $uri = str_replace('%KEYWORD%', urlencode($query), $uri); $url_parts = @parse_url($uri); if (isset($url_parts['scheme']) && isset($url_parts['host'])) { $uri = $url_parts['scheme'] . '://' . $url_parts['host']; $this->setUri($uri); } else throw new \Exception('No valid URI scheme was provided. '); $path = ''; if (isset($url_parts['path'])) $path = $url_parts['path']; if (isset($url_parts['query'])) $path .= '?' . $url_parts['query']; $response = $this->restGet($path); return $this->_decodeResponse($response); } }
[+]
..
[-] RssParser.php
[edit]