Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $url='http://url-file.com/file/downloads/misalnya-video.mp4';
- $file=@get_headers($url);
- if($file[0] == 'HTTP/1.0 404 Not Found'){
- echo'File tidak tersedia';
- }
- elseif($file[0] == 'HTTP/1.0 302 Found' && $file[7] == 'HTTP/1.0 404 Not Found'){
- echo'File tidak tersedia';
- } else {
- echo'File tersedia <a target="_blang" href="'.$url.'"> Cek</a>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement