hola amigos veran estoy usando un pequeño convertidor de imagenes en este caso de
PNG a JPG Código PHP:
<?php
$url = "abc.png";
$im = imagecreatefrompng($url);
// Set the content type header - in this case image/jpeg
header('Content-Type: image/jpeg');
// Output the image
imagejpeg($im);
?>
pero resulta que quise mas o menos probar su seguridad
converti un
abc.txt en
abc.png
dentro de
abc.png Código PHP:
<script>
alert('joder joder');
</script>
pero tira el siguiente error:
Warning: imagecreatefrompng() [function.imagecreatefrompng]: 'logo3.png' is not a valid PNG file in C:\AppServ\www\test6.php on line 3
Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\test6.php:3) in C:\AppServ\www\test6.php on line 5
Warning: imagejpeg(): supplied argument is not a valid Image resource in C:\AppServ\www\test6.php on line 7
lo que estoy buscando es que en vez de tirar el error ... elimine el fichero
abc.png , alguien me puede dar una manito ...