How to check backlinks of a website

Authors: CodeToday | PHP Code | Views: 508 | Posted: 05 AM: 09/05/2017

How to check backlinks of a websiteThe backlinks of a website are very important for keyword SEO, it is the power of the website in many factors with SEO.
To check the backlinks of a website, you can enter with the link:domain syntax.
This article will guide you how to check backlinks directly on the website through


<form action="" method="post" class="form-horizontal">
<div class="form-group">
<input type="text" name="domain" id="domain" value="<?=$_POST['domain']?>" class="form-control" placeholder = "Enter domain here ..." required/>
<div class="form-group">
<button type="submit" name="submit" class="btn btn-info">Check Backlinks Now</button>

The domain received from this form will be send directly to the following url'.$_POST['domain']

Note: You can change the number num =? (Maximum: 100)



$url       = ''.$_POST['domain'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPGET, 1 );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt($ch, CURLOPT_FOLLOWLOCATION , 1 );
curl_setopt($ch, CURLOPT_FOLLOWLOCATION , 1 );
curl_setopt($ch, CURLOPT_URL, $url );
curl_setopt($ch, CURLOPT_REFERER, $ref );
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);     
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
$html = curl_exec($ch);

$regexp    = "<as[^>]*href=("??)([^" >]*?)1[^>]*>(.*)</a>";
if(preg_match_all("/$regexp/siU", $html, $matches, PREG_SET_ORDER)) {

	foreach($matches as $match) {  
		if(filter_var($match[2], FILTER_VALIDATE_URL)) { //Filter out valid urls
			if(stristr($match[2],'google')    == false &&
			   stristr($match[2],'search?q=') == false) {	
				 $urlLink[] = $match[2];   		 

If you have any questions, please leave a message below