-
-
Save bueltge/2290887 to your computer and use it in GitHub Desktop.
<?php | |
/** | |
Example of use: | |
$bl_check = new Fb_Backlink_Checker( 'http://www.example.com', 'http://other.com' ); | |
$bl_check->get_contents(); | |
$bl_check->fetch_links(); | |
if ( TRUE !== $bl_check->check() ) { | |
echo 'Backlink not found.'; | |
}else{ | |
echo 'Backlink found'; | |
} | |
*/ | |
class Fb_Backlink_Checker { | |
var $url; | |
var $content; | |
var $links; | |
var $link_to_check; | |
function __construct( $url, $link_to_check ) { | |
$this->url = $url; | |
$this->link_to_check = $link_to_check; | |
} | |
function set_link_to_check( $link ) { | |
$this->link_to_check = $link; | |
} | |
function get_contents() { | |
$this->content = file_get_contents( $this->url ); | |
} | |
function fetch_links() { | |
$regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>"; | |
preg_match_all( "/$regexp/siU", $this->content, $matches ); | |
$this->links = $matches; | |
return $matches; | |
} | |
function check() { | |
foreach( $this->links[2] as $key => $url ) { | |
if ( $this->link_to_check == $url | |
return TRUE; | |
} | |
return FALSE; | |
} | |
} // end class |
<?php | |
// Example of use: | |
$bl_check = new Fb_Backlink_Checker( 'http://www.example.com', 'http://other.com' ); | |
$bl_check->get_contents(); | |
$bl_check->fetch_links(); | |
if ( TRUE !== $bl_check->check() ) { | |
echo 'Backlink not found.'; | |
}else{ | |
echo 'Backlink found'; | |
} |
Working my site, thanks:
https://24ch.press
I tried to add on my site https://www.digitaltrickstips.com :(
Hello Can anyone tell me the right and updated way to create a backlink checker function.
By the way i was searching backlinks of this website www.crickbatstips.com .
There are many websites but they are just showing the limited no. Of backlinks. Thats why iam looking for a script that can show me all the backlinks. Thanks
not working https://60dar40.com
not working for https://weblocale.it and also for https://weblocale.it
Tried on our site https://fotosnap.nl but unfortunately it didn't work. Thanks anyway
not working on my site https://www.sama-riyadh.com/
Its not working for https://www.aretesoftware.ca/
its not working for طراحی وب سایت and for طراحی سایت
Not working, please fix!
Tried to check: SEOCMS.
I tried everything from net, but nothing works. finaly bought one script for 30$, but it is not showing all the backlinks. That scripts works with Google custom search API key. I got it from console.developers.google.com. Now Google allows to show only 100 Backlinks per API Key. You can check that script in action check backlinks. Waste of money. It shows 20 - 70 links.
Anyone have updated, working versions?
I have try check WordPress Blog and not working.
I want to try Sintered wire mesh and metal filter website.
I checked It on this website tools https://tools.waytolearnx.com/ and It works great. Just try it.
I can not find any backlink of this page https://www.timehubzone.com