Aliresalat 181 ارسال شده در مهر 25، 1394 گزارش اشتراک گذاری ارسال شده در مهر 25، 1394 سلام امروز واسه یه قسمت از سایتم که نیاز بود این دو امار رو نشون بده واسه کاربر کدهای زیر رو استفاده کردم حالا واسه شما میذارم که استفاده کنید کد اول : به دست آوردن تعداد بک لینک سایت مورد نظر <?function GoogleBL($domain){$url="http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=link:".$domain."&filter=0";$ch=curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);curl_setopt ($ch, CURLOPT_HEADER, 0);curl_setopt ($ch, CURLOPT_NOBODY, 0);curl_setopt($ch, CURLOPT_TIMEOUT, 30);$json = curl_exec($ch);curl_close($ch);$data=json_decode($json,true);if($data['responseStatus']==200)return $data['responseData']['cursor']['resultCount'];elsereturn false;}?> کد دوم : به دست آوردن ایندکس سایت مورد نظر <?function GoogleIP($domain){$url="http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=site:".$domain."&filter=0";$ch=curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);curl_setopt ($ch, CURLOPT_HEADER, 0);curl_setopt ($ch, CURLOPT_NOBODY, 0);curl_setopt($ch, CURLOPT_TIMEOUT, 30);$json = curl_exec($ch);curl_close($ch);$data=json_decode($json,true);if($data['responseStatus']==200)return $data['responseData']['cursor']['resultCount'];elsereturn false;}?> امیدوارم به کارتون بیاد لینک به دیدگاه به اشتراک گذاری در سایت های دیگر More sharing options...
پست های پیشنهاد شده
بایگانی شده
این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.