Archive for September, 2003

.htaccess generator (and RSS Weather)

Tuesday, September 9th, 2003

A very nice find by Jennifer! This .htaccess generator wil create the code you need for your .htaccess file for various things - like custom 404 pages, hotlink protection, etc…

(update: Looks like there’s some issue about that first link being a copy (see comments) - here is the one that is said to be the original: EyeCreate - .htaccess File Wizard)

(She also found a neat RSS Weather thingy™. I’ve got to start paying attention to the Lockergnome RSS resources!)

Date Time

Tuesday, September 9th, 2003

Just wanted to store some code I use a lot and am tired of looking up ;-)
In some of the scripts I work on, I create a field for a timestamp. For that field I insert the PHP value: time()

When recalling that value, it’s just an ugly looking UNIX timestamp, so to format it to something nice, I do the following: (as posted on the PHP manual)

<?php
/*
Assuming the UNIX timestap was for : March 10th, 2001, 5:16:18 pm
and you already did a mysql query, and fetch_array
and the name of the field for timestamp, is ‘timestamp’
*/
$today = date(”F j, Y, g:i a”, $row['timestamp']);
// March 10, 2001, 5:16 pm
$today = date(”m.d.y”, $row['timestamp']);
// 03.10.01
$today = date(”Ymd”, $row['timestamp']);
// 20010310
$today = date(’\i\t \i\s \t\h\e jS \d\a\y.’, $row['timestamp']);
// It is the 10th day.
$today = date(”D M j G:i:s T Y”, $row['timestamp']);
// Sat Mar 10 15:16:08 MST 2001
?>

Blog layout creation tools

Sunday, September 7th, 2003

I just spotted this over at Sugarfused. Check it out…

Color Toy (Flash required)

It’s another color finder/color scheme toy. The nice thing about this one is that you can click “Random” and it will give you a (wait for it… wait for it) random color, along with other coordinating colors. Pretty cool. I just used it to generate a couple of random color schemes that I might try to use in the near future.

So go pick your colors, grab a picture, make a banner and the Firdamatic will design your layout for you. How easy is that?

Using php to selectively show or hide content based on MT category

Saturday, September 6th, 2003

All of you people that actually know PHP may want to skip this entry as what I’m about to say will probably make you cringe. You could probably do this in some frightfully easy way, but I’ve barely cracked my PHP book open, so this has to work for me for now.
(more…)

More Meaningful Comment Notifications

Saturday, September 6th, 2003

I wanted to change how my blog comment notifications looked. Since I only have one blog, I don’t need the first part to tell me which blog the comment is from. I also wanted to do whois lookups on the ipaddresses so I can get more info about the people who are commenting on my site.

(more…)

(Baby) first year script

Saturday, September 6th, 2003

I wrote a follow up to The Pregnancy Script that I thought I’d share with you guys!

The First Year Script is meant to allow new mommies to provide baby updates right on their websites. The script gives the baby’s name, birthdate, and current age, a recent picture, and a recent milestone. While it is called The First Year Script, you could theoretically use it for your child’s whole life. With the exception of twins, this script is meant to be used for one child at a time, so if you want to use it for all of your children, you will have to install multiple copies — probably in different directories on your site.

Estimate download times

Thursday, September 4th, 2003

There’s a few of these online… here’s one that looked pretty comprehensive: Online Download Time Calculator (or a more basic one here)

Articles on PHP security

Tuesday, September 2nd, 2003

Sam sent me this link which had three articles about php security - but since that page had pop-ups - here are the three articles directly:
PHP Security, Part I
PHP Security, Part II
PHP IP and Basic Information Harvester v1.00