نمونه کد php بنده :
<?php
$file1 = 'http://makanfile.com/file1.txt';
$file2 = 'http://makanfile.com/file2.txt';
$file_headers = @get_headers($file1);
$file_headers2 = @get_headers($file2);
if($file_headers[0] == 'HTTP/1.1 404 Not Found') {
if($file_headers2[0] == 'HTTP/1.1 404 Not Found') {
break;
}else{
$s=file_get_contents($file2);
echo $s;
}
}else {
$s=file_get_contents($file1);
echo $s;
}
?>