Say I have a variable: $var1 = "http://google.com/" Now how could I retrieve the page title from that variable? (In this case "Google"). Same goes if var1 was http://forums.digitalpoint.com, I need a way to retrieve "Internet Marketing and....whatever the rest of the title is" Thanks, BP
I didnt realise it would be so hard :S system() is blocked by servers, and the only example I could get of wget was iwith using system() Thanks anyway, BP
<?php $page = fopen('http://www.upload4ever.com','r'); while($cont = fread($page,1025654)){ $info .= $cont; } fclose($page); /* Since you don't want to read the entire page, maybe this would be sufficent $info = fread($page,1025654); But this will only pick up the first 1025654 bytes */ preg_match('/<title>(.*)<\/title>/Uis',$info,$results); $page_title = $results[1]; ?> PHP: Don't have time to test it, but it should work. Peace,