can any body give me a photo thumbnail script like phonerotica.com
ShaK!L AhammeD
Sklifbd.CoM +88-01730039272
Started on the old forum in December 2009 · view the original in the archive · old links redirect here
can any body give me a photo thumbnail script like phonerotica.com
Sklifbd.CoM +88-01730039272
Here is my gallery script(xhtml) with SIMPLE thumbails: http://coding-talk.com/f16/sladex-gallery-script-5423/
External image (may be gone) OR JUST SEND PM
it's simple script, this is it
<?php
@$file = $_GET["img"]; //Orginal File Url
@$heightfile = $_GET["h"]; // How Much be a Thumb Img height
@$weightfile = $_GET["w"]; // How Much be a Thumb Img width
if(preg_match("[http]",$file)) exit("Sorry");
if(preg_match("[\.\.]",$file)) exit("Sorry");
if(preg_match("[%]",$file)) exit("Sorry");
if($heightfile > 640) exit('Sorry');
if($weightfile > 480) exit('Sorry');
if(preg_match("[\.png]",$file)) {
$old = imagecreatefrompng("$file");
} elseif(preg_match("[\.gif]",$file)) {
$old = imagecreatefromgif("$file");
} elseif(preg_match("[\.jpg]",$file) or preg_match("[\.JPG]",$file)) {
$old = imagecreatefromjpeg("$file");
}
$weight = imageSX($old);
$height = imageSY($old);
//defult for if not set thumb height or width
if($heightfile) {
$wn = $weightfile;
$hn = $heightfile;
} else {
$wn = 60;
$hn = 80;
}
$new = imagecreatetruecolor($wn, $hn);
imageCopyResized($new, $old, 0, 0, 0, 0, $wn, $hn, $weight, $height);
Header("Content-type: image/jpeg");
imagejpeg($new);
?>
save this file with .php, ex: thumb.php add this html to apply img thumb anywhere in your site External image (may be gone)
External image (may be gone) Free Mobile Web Scripts by me: Free Youtube Downloader, Tweets Reader, Facebook Wall Posts Reader PHP Tutorials: [How to Secure Your PHP Script (PHP SECURITY)](http://coding-talk.com/f14/how-to-secure-you…