brian dichiara


Image Thumbnail Creator

Posted in PHP by briandichiara on the October 17th, 2007

Like many other people, I found Mike Lopez’s image thumbnail script quite useful. He has taken the time to go through the brain-crunching algorithm to create image proportional image thumbnails when given a max height/width. Although this script is very handy, it was lacking in a few areas, such as transparent PNG and GIF support, as well as the un-needed resize if the image was smaller than the requested dimensions. I hope I have “helped” in this situation by modifying the script so that it handles such requests. Credit for the transparency support goes to Martin Schmidt (icheee).

One modification I made that is important to note is that the image is now fed through with the SRC variable, rather than the IMG variable. Thanks Mike for this script and I hope my updates really help.
(more…)

Download Code

Posted in PHP by briandichiara on the October 9th, 2007

This code is something i found that will force download, rather than opening in browser:
(more…)

Validate Email Address

Posted in PHP by briandichiara on the February 23rd, 2007

Here’s some PHP code that will validate an email address.
(more…)

Interdum

Posted in PHP by briandichiara on the January 30th, 2007

This post is merely to display a block of code and how WP manages to jack it up. Notice the extra line break between each line of code. This isn’t going to work, and must be fixed!

margin-bottom: 12px;
font: normal 1.1em “Lucida Sans Unicode”, serif;
background: url(img/quote.gif) no-repeat;
padding-left: 28px;
color: #555;

Also, aren’t the blockquotes cool!?

Sed sodales nisl sit amet augue. Donec ultrices, augue ullamcorper posuere laoreet, turpis massa tristique justo, sed egestas metus magna sed purus.