Backlink verifier tool is used to check backlinks of your website on other websites. If you want to check your site’s link from 100 websites then it is difficult to check all those webpages one by one. And also you don’t know where the location of that link is and what is the anchor text of that link is.
Before we start developing this tool I want to tell you how our verify backlins tool works in the backend.
Explode urls list with \n.
We use jquery to separate urls with \n, but you can also use any other language that you want.
Separating using php:
$listUrls = explode("\n", $_POST['urls_list']);
After separation run a loop and fetch data of every webpage using php curl.
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_URL, $url);
$result = curl_exec($ch);
Now we have to get all links and anchor text used in that webpage so that we can compare it with the url that we want to verify. I am using simple_html_dom (a php library) to fetch all those anchor href attributes and anchor texts.
Now time to match your website with all those links that we got using html dom.
All done! Hope you liked this tutorial. I am not a professional writer that’s why you might have some difficulties to understand my wording. Please share this tutorial to keep me excited about my work.