How to check if remote file in specific URL exists with PHP

1 Answer

0 votes
$remote_file = 'https://www.collectivesolver.com//files/source_code.zip';

$handle = @fopen($remote_file, 'r');

if (!$handle){
    echo 'File not found';
} else {
    echo 'File exist';
}



/*
run:
           
File not found
 
*/

 



answered Sep 22, 2019 by avibootz

Related questions

1 answer 269 views
2 answers 1,135 views
1 answer 175 views
3 answers 346 views
1 answer 197 views
2 answers 371 views
371 views asked May 24, 2014 by avibootz
1 answer 195 views
195 views asked Dec 16, 2015 by avibootz
...