Last active
February 18, 2024 14:55
-
-
Save bueltge/2290887 to your computer and use it in GitHub Desktop.
Backlink Checker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'; | |
} |
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Its not working for https://www.aretesoftware.ca/