Thread: Check RAW data
View Single Post

  #1 (permalink)  
Old 04-20-2008
rb
 
Posts: n/a
Default Check RAW data

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) ?

Reply With Quote