Bulk Domain Authority

"; exit; } $domains = explode("\n",trim($_POST['linkcheck'])); echo "

"; ob_flush(); flush(); $totdomain = count($domains); for ($i=0;$i<$totdomain;$i=$i+10){ $batchedDomains = array(); for ($j=0;$j<10;$j++){ $cur = $i + $j; $domain = trim($domains[$cur]); array_push($batchedDomains,$domain); } get_da($batchedDomains,$i,$filenameda); ob_flush(); flush(); sleep(20); //exit; } function get_da($batchedDomains,$i,$filenameda){ $accessID = 'mozscape-a6de727e09'; $secretKey = '20d853d2ffb625b1786cdf3e1dedadbc'; $expires = time() + 300; //echo "
$expires
"; // Put each parameter on a new line. $stringToSign = $accessID."\n".$expires; // Get the "raw" or binary output of the hmac hash. $binarySignature = hash_hmac('sha1', $stringToSign, $secretKey, true); // Base64-encode it and then url-encode that. $urlSafeSignature = urlencode(base64_encode($binarySignature)); // Add up all the bit flags you want returned. // Learn more here: https://moz.com/help/guides/moz-api/mozscape/api-reference/url-metrics $cols = "103616137252"; // Put it all together and you get your request URL. $requestUrl = "http://lsapi.seomoz.com/linkscape/url-metrics/?Cols=".$cols."&AccessID=".$accessID."&Expires=".$expires."&Signature=".$urlSafeSignature; // Put your URLS into an array and json_encode them. $encodedDomains = json_encode($batchedDomains); // Use Curl to send off your request. // Send your encoded list of domains through Curl's POSTFIELDS. $options = array( CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => $encodedDomains ); $ch = curl_init($requestUrl); curl_setopt_array($ch, $options); $content = curl_exec($ch); curl_close( $ch ); $contents = json_decode($content); $counter =0; foreach ($contents as $obj){ $domain = $obj->uu; $da = $obj->pda; $da = round($da,2); $pa = $obj->upa; $pa = round($pa,2); if ($domain == "") $domain = trim($batchedDomains[$counter]); if ($domain == "") exit; echo "$domain|$da|$pa
"; ob_flush(); flush(); $counter++; } } ?>