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"), "") >= 1) { $rline = strip_tags("$line");

RE: [PHP] getting HTML header from URL

2002-11-01 Thread Brendon G
Can't you just call the contents of the page into a variable and extract what you need with regular expressions? Php / Html makes no difference its all text to fopen.. ~ > is there a way using fopen() or something similar t

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'); if(

Re: [PHP] getting HTML header from URL

2002-11-01 Thread Jule Slootbeek
well, i got it to read a html file, but the problem is that it reads it after it loads it, so it doesn't read the tags, and i'm looking for the string in between and is there a way using fopen() or something similar to read an html/php file before it's loaded? Jule On Friday, Nov 1, 2002, a

Re: [PHP] getting HTML header from URL

2002-11-01 Thread Jule Slootbeek
i thought fopen() was only for local files, didn't even bother looking, but now i think about it..it makes perfect sence to open url's as well, thanks a lot! Jule On Friday, Nov 1, 2002, at 17:42 US/Eastern, John Nichel wrote: Docs -> Function Reference -> Filesystem Functions -> fopen() It w

Re: [PHP] getting HTML header from URL

2002-11-01 Thread John Nichel
Docs -> Function Reference -> Filesystem Functions -> fopen() It was hidden. Jule Slootbeek wrote: hey is there a way to get the URL header? the tags etc? i couldn't find any function in the docs, but maybe i just don't know where to look. if there's a function that pulls in an entire page t