Hi, I am looking for a way how to get website backlinks list with PHP. I know the only one way and it is to use google search with "link" query. But there is one problem. If I use google search some website has no backlink but if I use for example Majestic or OpenSiteExplorer these service show me backlink. Can you give me advice how to create backlink list link in Majestic or OpenSiteExplorer? Thanks for advice. Michal
You can get a list of backlinks using PHP CURL, But for that also you have to depends on Google Apis... You can read this simple code to understand the process... http://99webtools.com/blog/php-script-to-count-google-backlinks-and-indexed-pages/ http://stackoverflow.com/questions/2751473/how-to-calculate-google-backlinks-using-php http://stackoverflow.com/questions/...nk-domains-of-any-particular-domain-using-php
Thanks for advice but there still same problem with using "link" parameter in google search. The problem is the fact that google does not show all backlinks because If I look at majestic seo or opensiteexplorer these services show me more backlinks that google. Which service do you mean? I find some information about yahoo backlink service which should take over to bing and I find in bing link explorer but like in google this service show only small number of backlinks. Can you have some other ideas? Thanks for advice.
Hope this will be little bit useful to you.. I found it from internet world. function check_back_link($remote_url, $your_link) { $match_pattern = preg_quote(rtrim($your_link, "/"), "/"); $found = false; if($handle = @fopen($remote_url, "r")){ while(!feof($handle)){ $part = fread($handle, 1024); if(preg_match("/<a(.*)href=[\"']".$match_pattern."(\/?)[\"'](.*)>(.*)<\/a>/", $part)){ $found = true; break; } } fclose($handle); } return $found; } Code (markup): An example of the function in use. if(check_back_link('http://www.google.com','http://www.yahoo.com')){ echo 'link found'; }else{ echo 'link NOT found'; }; Code (markup): Cheers, http://www.stepin-solutions.com//
The last one is completely useless, since you have to know the site you're checking against. This is only useful (somewhat) if you're checking to see if urls you've previously found are still there. It will also only check for one for each page, useless if you want to know how many.