*Sorry, my english so bad I need a function that check if there link in some websie. I mean, the function check if there the link: "www.example.com" on the site: "www.blabla.com". Thanks, and again, I have bad english :]
function check($where,$what){ $t=file_get_contents($where); if(preg_match('#<a href="'.$what.'">#',$t,$x)){ return true; }else{ return false; } }
Do a preg_match to extract all links and then go through the result array to find the required link You can find the preg_match here http://www.phpcollection.com/finding-tag-through-regex.html