Guest User

Untitled

a guest
Jun 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. // Though not an exhaustive list, better safe than sorry.
  2. if (preg_match('~(iframe|\\<\\?php|\\<\\?|\\<%|html|eval|body|script)~', $fileContents) === 1)
  3. {
  4. fclose($fp);
  5. return false;
  6. }
  7.  
  8. fwrite($fp, $fileContents);
  9. fclose($fp);
  10. }
  11. elseif ($fp)
  12. {
  13. $fp2 = fopen($url, 'rb');
  14. while (!feof($fp2))
  15. fwrite($fp, fread($fp2, 8192));
  16. fclose($fp2);
  17. fclose($fp);
Add Comment
Please, Sign In to add comment