Monthly Archives: January 2009

Integrating PHP Command Line Scripts with Existing Web Projects

After reading the post on Johan Mares site about the PHP command line interface, I thought I would indulge in the details how I’ve been using the PHP cli for some of my web based applications. First, some of my web apps have multiple configuration files which are determined by the $_SERVER[‘HTTP_HOST’] value. If (stricmp( […]

Converting URL to Local File Path in Batch MySQL INSERT Query Using SUBSTRING_INDEX() and CONCAT()

I wanted to quickly take a URL (e.g. http://www.compiledweekly.com/somefolder/somefile.ext) and translate it to the local path (e.g. /home/user/public_html/somefolder/somefile.ext) while inserting multiple records into a new table. My first thought was to select all the records, use PHP to trim off the path, then insert the new record in the new table. There’s a better answer, […]

Welcome to the Mandato Family Blog!

Welcome to the Mandato Family Blog. We’ll soon have lots to blog about with the soon arrival of our first baby Melanie. This blog is primarily intended for close friends and family. If you’re looking for something specific, please refer to the “Other Sites” found in the sidebar.