Use this function to display how many backlinks a given website has on Google.
This refers to the number of links that other websites (indexed by Google) have outgoing.
This number will vary from one datacenter to another or from time to time due to Google's updates on links and their data.
function google_backs($url){
$site = fopen('http://www.google.com/search?q=link%3A'.urlencode($url),'r');
while($cont = fread($site,1024657)){
$total .= $cont;
}
fclose($site);
$match_expression = '/of about <b>(.*)<\/b> linking to/Us';
preg_match($match_expression,$total,$matches);
return $matches[1];
}