tye

tye

Joined
Sep 19, 2003
Location
Canada
Website
Interests
Web Development

PHP Code Snippets

tye created a Page  -  Dec 31, 2006
11,334 

Shows differences in two strings of text.

  2 Threads   PHP  
tye created a Page  -  Sep 26, 2005

This snippet is for PHP 5+.

  3 Threads   PHP  
tye created a Page  -  Aug 29, 2005
350 

This function will brand an image with some text. You can give it a filename or an image resource. You can use built-in gd fonts or, with some modification, TrueType fonts if GD on the server supports it. Usage when giving the function a filename: brand_image('/path/to/file','text',font); The font is the built-in GDfont number. This number can be from 1 to 4. See also the PHP function imageloadfont()..

  2 Threads   PHP  
tye created a Page  -  Mar 10, 2005

This uses the GD library to create a thumbnail out of an image. $infile = path to source image $outfile = file and path to write the thumbnail to $maxw = Maximum width of the thumbnail $maxh = Maximum height of the thumbnail $stretch = Stretch image if it is smaller than the maxw and maxh The function will preserve the aspect ratio of the image. If you specify 0 for either $maxw or $maxh then the function..

tye created a Page  -  Sep 07, 2004

This small snippet will create an RSS feed. I've tested the format using several popular RSS readers and it seems to work fine.

  7 Threads   PHP  
tye created a Page  -  Sep 02, 2004
1 225 

Returns the size of a file using binary prefixes when given the file size in bytes.

  8 Threads   PHP  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.