Re: [PHP] getting HTML header from URL [solved]

2002-11-01 Thread Jule Slootbeek
hmm, figured it out...all of a sudden it did work: here's the code, it loads a URL and returns the title... dunno what it would be used for, but it aught we some more about php.. i'll probbly implement it on a link page ir something Jule function getTitle($url) { $file = @fopen($url, 'r');

Re: [PHP] getting HTML header from URL [solved]

2002-11-01 Thread Jule Slootbeek
oops didn't catch two little bugs Jule function getTitle($url) { $file = @fopen($url, 'r'); if(!$file) { $rline = Error, contact webmaster; } else { while (!feof ($file)) { $line = fgets($file); if (substr_count(strtoupper($line), TITLE) = 1) { $rline = strip_tags($line);