(.*)<\/title>/i', $header, $title)) { return $title[1]; } return "An Eclipse Proposal"; } function get_header_from_html_document(&$file_name) { $handle = @fopen($file_name, "r"); $content = ""; while (!feof($handle)) { $part = fread($handle, 1024); $content .= $part; /* * Only read up to the part that includes the * end tag for the header area. */ if (preg_match('/<\/head>/i', $part)) break; } fclose($handle); return $content; }