can any body give me a photo thumbnail script like phonerotica.com
photo thumbnail like phonerotica
Collapse
X
-
Here is my gallery script(xhtml) with SIMPLE thumbails:
http://coding-talk.com/f16/sladex-gallery-script-5423/
OR JUST SEND PM
Comment
-
it's simple script, this is it
save this file with .php, ex: thumb.phpPHP Code:<?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); ?>
add this html to apply img thumb anywhere in your site
<img src="thumb.php?img=path to orginal file" />
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)
Want to Develop/Edit your WAP/Web Site? Add me to Gtalk (gmail) 'lakshan1989' or PM me.
Comment

Comment