$max_size) { echo "File is too big !
\n"; exit; } if (($_FILES['userfile']['type']=="image/gif") || ($_FILES['userfile']['type']=="image/pjpeg") || ($_FILES['userfile']['type']=="image/jpeg") || ($_FILES['userfile']['type']=="image/png")) { if (file_exists("./".$path . $_FILES['userfile']['name'])) { echo "There already exists a file with this name, please rename your file and try again
\n"; exit; } //generate random number $zufall = rand(1,9999); $fupl = "$zufall"; $imgf = $fupl.$_FILES['userfile']['name']; //strip extra periods $info = pathinfo($imgf); $base = basename($imgf,'.'.$info['extension']); $ext = $info['extension']; //replace bad characters $base2 = preg_replace("/[^a-zA-Z0-9\-_]+/", "-", $base); $imgf = $base2 . '.' . $ext; //$imgf = preg_replace("/[^a-zA-Z0-9\-_\.]+/", "-", $imgf); //$imgf = str_replace ("}", "", $imgf); $res = copy($_FILES['userfile']['tmp_name'], "./".$path .$imgf); if (!$res) { echo "Didn't work, please try again
\n"; exit; } else { ?>
$old_y) { $thumb_w=$new_w; $thumb_h=$old_y*($new_h/$old_x); } if ($old_x < $old_y) { $thumb_w=$old_x*($new_w/$old_y); $thumb_h=$new_h; } if ($old_x == $old_y) { $thumb_w=$new_w; $thumb_h=$new_h; } $dst_img=ImageCreateTrueColor($thumb_w,$thumb_h); imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y); if (preg_match("/png/",$system[1])) { imagepng($dst_img,$filename); } if (preg_match("/gif/",$system[1])) { imagegif($dst_img,$filename); } else { imagejpeg($dst_img,$filename); } imagedestroy($dst_img); imagedestroy($src_img); } createthumb($path.$imgf,$tpath.$imgf,$tsize,$tsize); // ad ip to sendlink2 // $dt2=time(); $date = date("Y-m-d"); $time = date("H:i:s"); @mysql_query("INSERT INTO images$n (Date,Time,IP,Referer,filename) VALUES('".$date."','".$time."','".addslashes($_SERVER["REMOTE_ADDR"])."','".addslashes($_SERVER["HTTP_REFERER"])."','".$imgf."')"); ?> Image Hosting - ImageCross

HOME

Grab Your Code




You selected a wrong filetype!
\n"; exit; } } ?>
MySpace:
MySpace Thumbnail:
Html:
Html Thumbnail:
BBCode:
BBCode Thumbnail:
Share:
Your Image:


Upload Another Image









Online Advertising | Free Advertising | Web Advertising | Advertising | Online Advertising


"; exit; } ?>