Ars Informatica
September 28, 2020
Health Care Informatics
Web-based MySQL/PHP Databasing
Web Development
Favourite Software
Hardware for the Frugal Fanatic
Graphic Design and Image Processing
Free Scripts and Software
About Us
Contact Us

 Article Feed for this site

Unique file names for uploaded files using PHP

August 28, 2008

Web page file uploads are very useful - custom front ends, absolute simplicity for end users, control over file types uploaded. But you'll need to guard against overwriting existing files when a file with the same name is submitted.

This four-line! PHP scriptlet creates a new file name from the original, appending an underscore and new, unique, sequentially incrementing number as required.

I also step through the code, bit by little bit - a neat little introduction to Regular Expression matching, if you're interested.

How-to Rollover Images - CSS, Flash, and Javascript

August 25, 2008

Rollovers are images that change appearance when the mouse moves over them: slick and functional cues that this, indeed, is an active link, and it'll take you somewhere.

Rollover images can be coded in CSS, Flash, or Javascript. Which should you use? We present the pros and cons for each method, then tell you why we think you should use Javascript. (Hint: the CSS method causes artifacting in Internet Explorer, and Flash is frequently not supported.)

Finally, we present a very few lines of code - easy to modify, and we tell you how. It works, in all the browsers we've tested it on. See it in action.

[ Read more ... ]

A free, simple, tunable grayscale function for dynamic image conversion using PHP and the gd library

February 17, 2008

Looking for a simple, tunable grayscale function, one you - or your web site's visitors - can use to dynamically generate grayscale images? Look no further. The following images were all generated from the first, using PHP with the gd graphics library, and Ars Informatica's AI_grayscale() function:

And it's as easy as

AI_grayscale($image, 0.8); ... or easier. [ Read more ... ]

[ Prev ][ Next ]
Copyright © 2020 Ars Informatica. All Rights Reserved.