| | |
(Back) link checker
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
This function is usefull for peoples with a link directory where the links are stored inside a (MySQL) database. The PHP script is easy to use to find out if a reciprocal link still exists on the corresponding webpage. It takes care about the trailing slash in urls and can be used with (almost) every url. Inside the function is a check against a regular expression pattern and the result is a simple boolean. Check the example here
<?php 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; } // example: //if (check_back_link("http://www.all4yourwebsite.com", "http://www.finalwebsites.com")) echo "link exists"; ?>
0
•
•
•
•
this is not working
You have any code for baclink checker code for my web site
http://www.gezilistesi.com
You have any code for baclink checker code for my web site
http://www.gezilistesi.com
Similar Threads
- Back Link Proposal (Relevant Link Exchanges)
- 3 way link exchange - Online shopping Link back at Webdesign , SEO site ! (Relevant Link Exchanges)
- Broken Link Checker Tool - Check Dead Links On Website (Website Reviews)
- Link back to us (Relevant Link Exchanges)
- Need Education and Vegetarian Link. Link back on Pr2 site (Relevant Link Exchanges)
| Thread Tools | Search this Thread |
apache api array basic beginner binary body broken cakephp class cms code computing confirm cron curl customizableitems database date date/time delete display dynamic echo email error file files filter folder form forms forum function functions gc_maxlifetime global google headmethod href htaccess html iframe image include ip javascript joomla limit link list login malfunction memmory memory menu mlm msqli_multi_query multiple mycodeisbad mysql navigation oop parameter parsing paypal pdf php play query question random recourse recursion regex root script search seo server sessions snippet source space sql static system table thesishelp trouble tutorial update upload url variable video web webdesign xml youtube



