|  Данный скрипт показывает как легко и просто получить заголовок удаленной страницы
 
  php
 
 $file = fopen ("http://www.php.net/", "r");
 
 if (!$file) {
 
 echo "
 unable to open remote file.n"; 
 exit;
 
 }
 
 while (!feof ($file)) {
 
 $line = fgets ($file, 1024);
 
 /* this only works if the title and its tags are on one line */
 
 if (eregi ("(.*)", $line, $out)) {
 
 $title = $out[1];
 
 break;
 
 }
 
 }
 
 fclose($file);
 
 ?>
 
 |