photo thumbnail like phonerotica

Started on the old forum in December 2009 · view the original in the archive · old links redirect here

3 replies · 4,445 views · started 16 years ago · 1 min read

4 participants
sklbd Junior · 47 posts #1

can any body give me a photo thumbnail script like phonerotica.com

ShaK!L AhammeD

Sklifbd.CoM +88-01730039272

kei_ki7 Senior · 431 posts #2

what do you mean? like phpthumb? or like a photo gallery?

Did I help you? You can help me too Your donations will help me finance my studies.

firemax Developer · 221 posts #4

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…

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close