別のリンクを試さない場合でも、リモートサーバーでリンクが機能しているか/存在しているかどうかを確認する最速の方法を探しています。nginxの「try_files」に似ていますが、リンクのみです。
例えば:
try first
header("Location:" . $VIDEO_1);
if there's no $VIDEO_1 try
header("Location:" . $VIDEO_2);
if there's no $VIDEO_2 try
header("Location:" . $VIDEO_3);
現在、サイズをチェックしてヘッダーを送信する関数を使用しています...しかし、そのファイルサイズのチェックは遅いです
if($file_size > "9000000"){
header("Content-type: video/x-flv");
header("Location:" . $VIDEO . $dop);
}else{
header("Content-type: video/x-flv");
header("X-Accel-Redirect: /".$_GET["filename"].$dop);
}