I've built a web directory just for pure practice, and for some strange reason the code I've built to get the webpage title only works on some websites, here is the code I'm using:
function getTitle($link){
$str = file_get_contents($link); if(strlen($str)>0){ preg_match("/\<title\>(.*)\<\/title\>/",$str,$title); return $title[1]; }}
It works for some webpages, other it doesn't, when I try codecall.net it gives the error 301 Moved Permanently...
Try it yourself: The Hyperlink Directory - The ultimate web directory and backlink creator
Thanks guys, all help is appreciated.


Sign In
Create Account


Back to top









