I needed to grab a (CSV) file via FTP and import it into a database. The part that I thought would be the hardest (the FTP part) was actually very simple. Once again, PHP saves the day with incredibly powerful built in functionality. Here is the simple code that will connect to an FTP server […]
The point of this script-snippet is so you can set up two hierarchies of categories. So there's a main category, and a few "sub-categories" below it. An example of this is on Christine's Pixelog site, on her album page. This differs from the way MT has "Primary" and "Secondary" categories in that in mine, the […]
I use this almost on a daily basis, and yet I can't commit it to memory. So I don't have to go searching for it each time I need to write it… $databaseName = "YOURDATABASENAME"; $dbconnection = mysql_connect("localhost", "DATABASE-USERNAME", "DATABASE-PASSWORD") or die ('I can?t connect to the database.'); mysql_select_db($databaseName,$dbconnection); $value = "SOMEVALUE"; $query = sprintf("SELECT […]
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 […]
Comments Off on Date Time
25 Aug, 2003
Posted by: Jennifer In: Scripts
12 Aug, 2003
Posted by: Jennifer In: Scripts
New script for you! This one will allow you to put a form on your site that takes short "comments" from your readers not neccessarily related to any specific post. You can also display the last 10(or any number) "hi"s left behind. The idea behind this script was based on my own actions – Many […]
28 Jul, 2003
Posted by: Jennifer In: Scripts