I'm trying to write a script to help a friend out that validates the existence of file and if it exists downloads, otherwise tells the user the file is invalid.
<?php
$video1 = "conflicting.mpg";
$fp = @fopen("$video1", "r");
if ($fp)
{ print "Valid File!";
fopen($video1); }
else
{ print "File does not exist!"; }
fclose($fp);
?>
Am I at least on the right track? And if so, will the way it's currently set-up attempt to stream the file or save to disk? I need it to saved to the hard drive.