Forum Moderators: coopster
Here the script:
function draw_image($src) {
global $size;
list($width, $height, $type, $attr) = getimagesize($src);
if($size == 'full') {
$img = imagecreatefromstring(file_get_contents($src));
} else {
if(file_exists(stripslashes(PATHT.$_REQUEST['src']))){
imagedestroy($img);
$img=imagecreatefromjpeg(urldecode(stripslashes(PATHT.$_REQUEST['src'])));
} else {
$img = imagecreatefromstring(file_get_contents($src));
$lowest = min(THMBWIDTH / $width, THMBHEIGHT / $height);
if($lowest < 1) {
$smallwidth = floor($lowest*$width);
$smallheight = floor($lowest*$height);
$tmp = imagecreatetruecolor($smallwidth, $smallheight);
imagecopyresized($tmp, $img, 0, 0, 0, 0, $smallwidth, $smallheight, $width, $height);
imagedestroy($img);
$img = $tmp;
$file = urldecode(stripslashes(PATHT.$_REQUEST['src']));
imagejpeg($img,$file);
}
}
}
mostrar($type,$img);
imagedestroy($img);
I'd appreciate any feedback ...totally lost here...
Now i will take a look at Post and Get.. to find how to use them (iam a programmer but new to php).
Thanks in advance.
hmmm, maybe try changing all occurences of PATHT.$_REQUEST['src'] with $src as $src seems to be the image path
I think you have display_errors [php.net] turned off in your php.ini as well because that should be giving you a parse error. It also may just be that error_reporting [php.net] is set too low.
<snip>
Please take a look... iam stuck.... =(
Thanks in advance.
[edited by: dreamcatcher at 7:17 am (utc) on May 1, 2007]
[edit reason] no urls as per T.O.S [webmasterworld.com].Thanks [/edit]