Sani
public php v1 · immutable<?php $tmp = explode ( '.', $_FILES['userfile']['name']); $fileext = $tmp[count($tmp)-1]; $allowedexts = array("rpm", "gz", "tar", "bz2"); if (in_array($fileext, $allowedexts)) { print "File is trusted."; } else { print "File not trusted!"; }?>