Posts Tagged ‘Source code’
Multiple random banners (images)
This script will randomly pick three images from a directory of any mumber of .jpg files. No image will be duplicated Put all your .jpg images in a single directory. You will need to modify the first line of the script to specify this path. The script is written to show three random images. You [...]
Making thumbnails show on page with php
Php makes it easy to create thumbnails if you have the GD library installed. Lets see the following example. <? header(“Content-type: image/jpeg”); $first=ImageCreateFromJPEG(“myimage.jpg”) or die(“couldn’t open image”); $second=ImageCreate(100,150) or die(“couldn’t create image”); ImageCopyResized($second,$first,0,0,0,0,100,150,imagesx($first),imagesy($first)) or die(“coudln’t resize image”); ImageJPEG($second,”thumb.jpg”) or die(“couldn’t save image”); ?> In the example above we will create a thumbnail of 100×150 pixels [...]
Auto create thumb images with PHP
We’ll now proceed through the script and explain each block in excruciating detail. I hope you have caffeine ready, you may need it. <?PHP # Constants define(IMAGE_BASE, ‘/var/www/html/ozzie/images’); define(MAX_WIDTH, 150); define(MAX_HEIGHT, 150); ?> First we should define a few constants. IMAGE_BASE points to the directory from which images are to be served. Only images in [...]
Auto create thumb images with PHP
Depending upon how it’s done, displaying a page of thumbnail images can be very cumbersome. Allowing the browser to resize images requires the client browser to download the entire, full-size image, then clumsily resize the image to a specified size. This causes the page to load very slowly and creates unavoidable distortion in the resulting [...]
Create random banner using PHP
This script will need to automatically display a single image out of a collection of available images. The easiest way to tackle this is to use a single array. This way, we can generate a random number, then call the particular image, which we saved within the array data structure. The first step is seeding [...]
Dynamic Image / Signature Generator
The file need create: Code 1: dynamic_sig.php (you can rename this to index.php and you’ll see at the end why) Code 2: a simple text file named anything (I will call it name.txt). <?php header(“Content-type: image/png”); $image = imagecreatefrompng(“../path/sotw_background.png”); //imagecolorallocate($image, R, G, B) in HEX values $font_black = imagecolorallocate($image, 2, 1, 8); $font_blue = imagecolorallocate($image, [...]
Auto add Watermark on your images
Hi, Everybody here ! The best way to protect your images is to watermark them. But that can be a real hassle. This script will take any image and automatically add a watermark before it is delivered from the server to the person’s browser. The instructions for using this script are in the comment lines [...]
Magento Shop best source for designers
Magento’s feature-rich frontend strives to give customers an intuitive, Control multiple websites and stores from one Administration Panel with ability to share as much or as little information as needed Multi-Lingual Support for localization Support for multiple currencies Administration Permission System Roles and Users Web Services API for easy integration between Magento and any third-party [...]



