([\d,]+)<\/b> from ' . $host . '/si', $data, $p); $value = ($p[1]) ? $p[1] : "n/a"; $string = "" . $value . ""; return $string; } function getGoogleLinks($host) { $request = "http://www.google.com/search?q=" . urlencode("link:" . $host) . "&hl=en"; $data = getPageData($request); preg_match('/([\d,]+)<\/b> linking to ' . $host . '/si', $data, $l); $value = ($l[1]) ? $l[1] : "n/a"; $string = "" . $value . ""; return $string; } function getYahooPages($host) { $request = "http://siteexplorer.search.yahoo.com/search?p=" . urlencode("http://" . $host); $data = getPageData($request); preg_match('/Pages \(([\d,]+)/si', $data, $p); $value = ($p[1]) ? $p[1] : "n/a"; $string = "" . $value . ""; return $string; } function getYahooLinks($host) { $request = "http://siteexplorer.search.yahoo.com/search?p=" . urlencode("http://" . $host); $data = getPageData($request); preg_match('/Inlinks \(([\d,]+)/si', $data, $l); $value = ($l[1]) ? $l[1] : "n/a"; $string.= "" . $value . ""; return $string; } function getBingPages($host) { $request = "http://www.bing.com/search?q=" . urlencode("site:" . $host) . "&mkt=en-US"; $data = getPageData($request); preg_match('/1-([\d]+) of ([\d,]+)/si', $data, $p); $value = ($p[2]) ? $p[2] : "n/a"; $string = "" . $value . ""; return $string; } function getBingLinks($host) { $request = "http://www.bing.com/search?q=" . urlencode("inbody:" . $host) . "&mkt=en-US"; $data = getPageData($request); preg_match('/1-([\d]+) of ([\d,]+)/si', $data, $p); $value = ($p[2]) ? $p[2] : "n/a"; $string = "" . $value . ""; return $string; } function getAskPages($host) { $request = "http://www.ask.com/web?q=" . urlencode($host . " site:" . $host); $data = getPageData($request); preg_match('/([\d]+)<\/span> of ([\d,]+)/si', $data, $p); $value = ($p[2]) ? $p[2] : "n/a"; $string = "" . $value . ""; return $string; } function getAlexaRank($domain) { $request = "http://data.alexa.com/data?cli=10&dat=s&url=" . $domain; $data = getPageData($request); preg_match('//si', $data, $p); $value = ($p[2]) ? $p[2] : "n/a"; $string = "" . number_format($value) . ""; return $string; } function getAlexaLinks($domain) { $request = "http://data.alexa.com/data?cli=10&dat=s&url=" . $domain; $data = getPageData($request); preg_match('//si', $data, $l); $value = ($l[1]) ? $l[1] : "n/a"; $string = "" . number_format($value) . ""; return $string; } function getDMOZListings($domain) { $request = "http://data.alexa.com/data?cli=10&url=" . $domain; $data = getPageData($request); preg_match('//si', $data, $s); $value1 = ($s[1]) ? $s[1] : ""; $value2 = ($s[2]) ? $s[2] : ""; $value3 = ($s[3]) ? $s[3] : ""; preg_match('//si', $data, $c); $value4 = ($c[1]) ? $c[1] : ""; $value5 = ($c[2]) ? $c[2] : ""; $value6 = ($c[3]) ? $c[3] : ""; $string = ""; if($value4) { $string = "" . $value5 . ""; } else $string = "n/a"; return $string; } function getPageData($url) { if(function_exists('curl_init')) { $ch = curl_init($url); // initialize curl with given url curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // add useragent curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // write the response to a variable if((ini_get('open_basedir') == '') && (ini_get('safe_mode') == 'Off')) { curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); // follow redirects if any } curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); // max. seconds to execute curl_setopt($ch, CURLOPT_FAILONERROR, 1); // stop when it encounters an error return @curl_exec($ch); } else { return @file_get_contents($url); } } function getDomainName($host) { $hostparts = explode('.', $host); // split host name to parts $num = count($hostparts); // get parts number if(preg_match('/^(ac|arpa|biz|co|com|edu|gov|info|int|me|mil|mobi|museum|name|net|org|pp|tv)$/i', $hostparts[$num-2])) { // for ccTLDs like .co.uk etc. $domain = $hostparts[$num-3] . '.' . $hostparts[$num-2] . '.' . $hostparts[$num-1]; } else { $domain = $hostparts[$num-2] . '.' . $hostparts[$num-1]; } return $domain; } $sitehost = $_SERVER['HTTP_HOST']; $sitedomain = getDomainName($sitehost); ?> LS SEO
Report for
Google indexed pages:
Google inbound links:
Yahoo indexed pages:
Yahoo inbound links:
Bing indexed pages:
Bing inbound links:
Ask indexed pages:
Alexa Ranking:
Alexa inbound links:
DMOZ listing: