<?php
function getTitle($Url){
$str = file_get_contents($Url);
if(strlen($str)>0){
preg_match("/\<title\>(.*)\<\/title\>/",$str,$title);
return $title[1];
}
}
echo getTitle("http://www.stackoverflow.com/");
?>
このスクリプトを実行すると、エラーが返されます
max_execution_time exceeds 30 second.
max_execution_time を増やしたくはありませんが、スクリプトの実行時間を減らしたいです。