예제 #1
0
 /**
  * Gets domain and URL authority from SEOmoz.
  *
  * @access		private
  * @link 		http://www.seomoz.org/api		The SEOmoz API
  * @return		array 					Returns array, containing authority data.
  */
 public static function Seomoz_Authority($uri)
 {
     // external helper class
     include_once 'ext/SeoMoz/Authenticator.php';
     $authenticator = new Authenticator();
     $url = urlencode($uri);
     $tmp = SEOstats::cURL('http://lsapi.seomoz.com/linkscape/url-metrics/' . $url . '?' . $authenticator->getAuthenticationStr());
     $data = json_decode($tmp);
     $result = array('Title' => $data->ut, 'URL' => $data->uu, 'External Links' => $data->ueid, 'Links' => $data->uid, 'URL Authority' => $data->upa, 'URL mozRank' => $data->umrp, 'Subdomain mozRank' => $data->fmrp, 'HTTP Status Code' => $data->us, 'Page Authority' => $data->upa, 'Domain Authority' => $data->pda);
     return $result;
 }