/** * WPSDReddit. * @param string $domain * @param boolean $curl */ function WPSDReddit($domain, $curl = false) { parent::WPSDStats(); $domain = $this->getNormalizedUrl($domain); $this->address = "http://www.reddit.com/api/info.json?url=" . $domain; $form = new WPSDAdminConfigForm(); $username = $form->getWpsdRedditUn(); $this->profile_address = "http://www.reddit.com/user/{$username}/"; $this->domain = $domain; if ($this->isOutdated() && '' != $domain) { $this->xml = $this->fetchDataRemote($this->address); $this->xml2 = $this->fetchDataRemote($this->profile_address); $this->set(); } else { $this->set_cached(); } }