Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Though not an exhaustive list, better safe than sorry.
- if (preg_match('~(iframe|\\<\\?php|\\<\\?|\\<%|html|eval|body|script)~', $fileContents) === 1)
- {
- fclose($fp);
- return false;
- }
- fwrite($fp, $fileContents);
- fclose($fp);
- }
- elseif ($fp)
- {
- $fp2 = fopen($url, 'rb');
- while (!feof($fp2))
- fwrite($fp, fread($fp2, 8192));
- fclose($fp2);
- fclose($fp);
Add Comment
Please, Sign In to add comment