Tag Archives: PHP

PHP cURL and Error 417 (Expectation Failed)

I recently noticed that my KD5HIA Weather app for iPhone stopped receiving push notifications for weather advisories. One of the PHP scripts I use to send the notifications uses cURL to POST the message via HTTP to another script on one of my other servers, and it was failing with: 417 – Expectation Failed. WTF?

Read more

Trying my hand at Ruby on Rails

I’ve recently been tasked with developing a new application for our sales executives. It will be a project estimating tool, and it will replace the Excel spreadsheet they currently use. Actually, the concept of this application, named Moxie, has evolved to become a central web portal for all employees where they will find all sorts [...]

Read more

PHP: Email Validation

This is a function I found in an article by Douglas Lovell at LinuxJournal.com which will take an email address and return true or false on whether it’s valid. I was in search of a good regex, but ultimately decided that a one-liner would just be too messy. Douglas explains (very well) why the function [...]

Read more

Enabling PHP mail() in Debian easily and quickly

I’ve run into a problem more than once where the mail() function in PHP didn’t work. Unlike in Windows, you can’t simply set an SMTP server in the php.ini file; you must set a value for the sendmail_path. If you’re running a mail server like Sendmail of Postfix alongside your web server, this is no [...]

Read more

PHP: Create a Microsoft GUID

This function will return a standard 128-bit GUID, consisting of one group of 8 hexadecimal digits, followed by three groups of 4 hexadecimal digits each, followed by one group of 12 hexadecimal digits. Example: 6B29FC40-CA47-1067-B31D-00DD010662DA

Read more