Hello,
Here is a theoretical way (The first snippet on reading the file into a variable comes from the php.net site with a slight change to grab $PHP_SELF):
===============
// get contents of a file into a string
//replace /root/path/ with your actual info
$filename = "/root/path/" . $PHP_SELF;
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
//now pull the title from $contents
$pagetitle = substr($contents, (strpos($contents, "<title>") + strlen("<title>")), strpos($contents, "</title>"));
===============
I haven't tested it out, but the basic theory is to save your file to a variable, then pull the page title by finding the start and end char positions for the <title> tags. Once you have this, you select everything between those points with substr(). That gets your title. This assumes you don't run into any permission problems with reading the file. Good luck.