$videos=unserialize(file_get_contents('http://vimeo.com/api/v2/user1334315/all_videos.php')); if ((time()-172800)<(strtotime($videos[0]['upload_date']))) { $video=$videos[0]; } else { $video=$videos[rand(0,count($videos))]; } ?>