Hi, Sometimes the data are not showing. for (page authority,dmoz rank) i need to re do the test/ then it will come up: Here is my code: ``` /* Get SEOmoz Data -------------------------------------------------- */ public function getSeoMoz($domain, $accessid = "", $secret = "") { try { $access_id = (empty($accessid) ? $_SESSION['SEOMOZ_API_ACCESSID'] : $accessid); $secret_key = (empty($secret) ? $_SESSION['SEOMOZ_API_SECRETKEY'] : $secret); $expires = time() + 5000; $stringToSign = $access_id."\n".$expires; $binarySignature = hash_hmac('sha1', $stringToSign, $secret_key, true); $urlSafeSignature = base64_encode($binarySignature); $callback_url = "http://lsapi.seomoz.com/linkscape/url-metrics/www." . $domain . "?"; $data = array( 'Cols' => '68719493120', 'AccessID' => $access_id, 'Expires' => $expires, 'Signature' => $urlSafeSignature ); $curl_response = $this->curl->get($callback_url . http_build_query($data, '', '&')); if ($curl_response->headers['Status-Code'] == "200") { $parse_response = json_decode($curl_response, true); $domain_authority = $parse_response['pda']; $mozrank = $parse_response['umrp']; $response = array( 'status' => 'success', 'data' => array( 'domain_authority' => (int)round($domain_authority), 'mozrank' => (int)round($mozrank) ) ); } else { $response = array( 'status' => 'error', 'msg' => 'SEOMoZ Response Error.' ); } } catch (Exception $e) { $response = array( 'status' => 'error', 'msg' => $e->getMessage() ); } return $response; } ```
Activity