[Edit] Validating Files Source or content
example$disallowed = 'body|head|html|pre|script|table|title'; if(check_content('/path/to/file.php',$disallowed)){ } function check_content($filename,$disallowed_content) { $disallowed_content = explode('|', $disallowed_content); $fp = @fopen($filename, 'rb'); if ($fp !== false) { $ie_mime_relevant = fread($fp, 256); fclose($fp); foreach ($disallowed_content as $forbidden) { if (stripos($ie_mime_relevant, '<' . $forbidden) !== false) { return false; } } } return true; } |
This Page is Under Construction! - If You Want To Help Please Send your CV - Advanced Web Core (BETA)
© Advanced Web Core. All rights reserved