PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Syam   Easy Thumbnail Maker   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example on using the class
Class: Easy Thumbnail Maker
Generate thumbnails of image files
Author: By
Last change:
Date: 17 years ago
Size: 442 bytes


Class file image Download
// Simple thumbnail maker
// Variables available are
// extension, upfile, dstfile, max_width, max_height
// Currently supports GIF and JPG
// makeThumb($max_width, $max_height, $upfile, $dstfile);
$tum = new thumbMaker;
$grabExt = explode(".", $_FILES['file']['name'];
$tum->extension = $grabExt[1];
$tum->upfile = $_FILES['file']['tmp_name'];
$tum->dstfile = "mythumb/" . $_FILES['file']['name'];