我正在使用PHP腳本通過其ID來播放YouTube視頻並獲取視頻標題和相關視頻。如何在發生故障時重試操作
我的問題是,有時頁面在標題或相關視頻鏈接出現之前完成加載。
我使用000WebHost.com免費虛擬主機;它有一些限制,如出於安全原因禁用某些功能,包括set_time_limit(),所以我不能使用它。
如果例如長度爲零,是否有任何方法可以重試加載標題和視頻鏈接?
事情是這樣的:
<?php
if (strlen($title) == 0) {
// Do something here to retry loading the title from
// http://www.youtube.com/get_video_info?video_id=VIDEO_ID
}
?>
任何想法?
做的是買託管,一些廉價的網絡的最好的事情是不是這樣的限制。 – Brad