| | |
(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 beginner binary body broken cakephp checkbox class cms code computing cron curl database date date/time delete display dynamic echo email error file files filter folder form forms function functions gc_maxlifetime global google host href htaccess html image include insert ip javascript joomla limit link list login mail memmory memory menu mlm msqli_multi_query multiple mycodeisbad mysql navigation oop parameter parsing paypal pdf php problem query radio random recourse recursion regex remote script search seo server sessions sms snippet source space sql static syntax system table thesishelp tutorial update upload url validator variable video web webdesign wordpress xml youtube



