May 16, 2008

PHP: Formatting dates

Formatting dates can be tricky for the beginning PHP programmer, here’s a few simple examples that will get you started. I’ll go over how to convert from database date formats to traditional date formats and back again, as well as how to test a date using regular expression matching…

March 14, 2008

Socket To Me, One More Time

Sorry, I couldn’t resist. I’ve been testing receiving data through the socket server I talked about in my last post. If you are testing without a steady stream of incoming data, you may need to generate your own UDP packets to send to your socket server. Here’s a simple script to open [...]

Socket To Me

Sockets are the building blocks of networking connections between computers. Today I want to go though how to create a UDP listener (or socket server) in PHP. I recently had to do this to receive GPS data from some black boxes, and had a hard time finding examples of this type of UDP [...]

February 18, 2008

The Power of Regular Expressions

Regular expressions can be somewhat daunting to the beginning programmer. They really do look scary. But just like the back of your math book, it feels pretty good to look back and realize how far you’ve come. I’m going to give you an example of the power of regular expressions, and this [...]

February 4, 2008

Planned programming precepts of positive proportions in PHP

I’ve had the pleasure over the last year to be the sole creator and implementer of a web-based production tracking system at my work. Written in PHP the system handles tracking of an order through production from production scheduling to delivery. I think the most salient point of all [...]

January 31, 2008

DIY Quick and Dirty MySQL query tool with PHP

We all love phpmyadmin it’s a great tool for managing databases, but it’s nice to have a web based query tool that you can allow others to access where they can get and save a query as a bookmark, and not endanger your database security too much. This is a quick and dirty way [...]