Has stopped working!\\

<code>
$sfile = "youtubehhh.txt";
$slife = 3600; // 1 hour
if (!file_exists($sfile) or (time() - filemtime($sfile) >= $slife)){
 $url="https://gdata.youtube.com/feeds/api/videos?q=hash+house+harriers&orderby=relevance";
 $xml=simplexml_load_file($url);
 if($xml){
  $fp = fopen($sfile,'w');
  $i=0;
  foreach($xml->entry as $e) {
   $id=$e->id;
   $id=str_replace("http://gdata.youtube.com/feeds/api/videos/","",$id);
   $title=$e->title;
   $content=$e->content;
   $author=$e->author->name;
   $user=$e->author->uri;
   $user=str_replace("https://gdata.youtube.com/feeds/api/users/","",$user);
   fwrite($fp,"Title::$title:::Author::$author:::UserID::$user:::ID::$id:::Content::$content\n"); 
   $i++;
  }
 fwrite($fp,"Items::$i");
 fclose($fp);
 }
}
$lines=file('youtubehhh.txt');
$show=rand(1,count($lines)) - 1;
$p = explode(":::",$lines[$show]);
$title=substr($p[0],7);
$user=substr($p[2],8);
$id=substr($p[3],4);
$content=substr($p[4],9);
$author=substr($p[1],8);
echo "<br /><hr /><strong>A random Youtube video with search terms</strong> - <i>hash house harriers</i><br />\n";
echo "<div><h3>$title</h3><br /><iframe width='220' height='165' src='http://www.youtube.com/embed/$id' frameborder='0' allowfullscreen></iframe><br /><a href='http://www.youtube.com/user/$user'>$author</a><br />$content</div>";
</code>