Check RAW data
| From: | rb | Date: | Sun, 20 Apr 2008 13:52:13 +0000 |
| Subject: | Check RAW data | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-273322@lists.php.net to get a copy of this message | ||
I'm getting from an external source a PNG image in raw format (encoded in base64).
And with this code I'll echo on the screen.
------
$img=base64_decode($_POST['img']);
header("Content-type: image/png");
echo $img;
------
How can I check if the data received is a real PNG raw (and not malicious code) ?