コード例 #1
0
 /**
  * WPSDBacktype.
  * @param string $domain
  * @param boolean $curl
  */
 function WPSDBacktype($domain, $curl = false)
 {
     parent::WPSDStats();
     $domain = $this->getHost(parse_url($domain));
     $this->address = "http://www.backtype.com/domain/{$domain}";
     $form = new WPSDAdminConfigForm();
     $twitter_un = trim($form->getWpsdTwitterUn());
     if ('' != $twitter_un) {
         $this->address_backtweets = "http://backtweets.com/user/{$twitter_un}";
     }
     if ($this->isOutdated() && '' != $domain) {
         $this->set();
     } else {
         $this->set_cached();
     }
 }
コード例 #2
0
ファイル: WPSDKlout.php プロジェクト: billadams/forever-frame
 /**
  * loadData function.
  * 
  * @access public
  * @param string $username. (default: '')
  * @return void
  */
 function loadData($username = '')
 {
     if ('' == $username) {
         $form = new WPSDAdminConfigForm();
         $this->un = trim($form->getWpsdTwitterUn());
     } else {
         $this->un = $username;
     }
     $request = 'http://api.klout.com/1/klout.json?key=ztfmf92wg98k8s5pyv49x3kv&users=' . $this->un;
     $this->address = 'http://klout.com/profile/summary/' . $this->un . '/';
     if ($this->is_cache_outdated('klout_cache', $this->un)) {
         $this->xml = $this->fetchDataRemote($request);
         $this->set();
         $this->updated_cache('klout_cache', $this->un);
     } else {
         $this->set_cached();
     }
 }
コード例 #3
0
 /**
  * WPSDPeerIndex function.
  * 
  * @access public
  * @param string $username. (default: '')
  * @return void
  */
 function WPSDPeerIndex($username = '')
 {
     parent::WPSDStats();
     if ('' == $username) {
         $form = new WPSDAdminConfigForm();
         $this->un = trim($form->getWpsdTwitterUn());
     } else {
         $this->un = $username;
     }
     if ('' != $this->un) {
         $this->address = 'http://www.peerindex.com/' . $this->un;
         if ($this->is_cache_outdated('peerindex', $this->un)) {
             $this->xml = str_replace(',', '', $this->fetchDataRemote($this->address, false, 1, true));
             $this->set();
             $this->updated_cache('peerindex', $this->un);
         } else {
             $this->set_cached();
         }
     }
 }
コード例 #4
0
 /**
  * WPSDTwitter function.
  * 
  * @access public
  * @param string $username. (default: '')
  * @return void
  */
 function WPSDTwitter($username = '')
 {
     parent::WPSDStats();
     if ('' == $username) {
         $form = new WPSDAdminConfigForm();
         $this->un = trim($form->getWpsdTwitterUn());
     } else {
         $this->un = $username;
     }
     if ('' != $this->un) {
         $this->address = 'http://twitter.com/' . $this->un;
         if ($this->is_cache_outdated('twitter', $this->un)) {
             $api_url_request = "https://api.twitter.com/1/users/lookup.json?screen_name={$this->un}&include_entities=true";
             $this->xml = str_replace(',', '', $this->fetchDataRemote($api_url_request));
             $this->set();
             $this->updated_cache('twitter', $this->un);
         } else {
             $this->set_cached();
         }
     }
 }