fread( ) is good for when you only care about a small part of the file.
<? $zipfile = fopen("data.zip", "r"); if (fread($zipfile, 2) != "PK") { print "Data.zip is not a valid Zip file!"; } fclose($zipfile); ?>