Did you ever save dates as a string when you were a n00b? OK I’ll admit it, I did! Want to convert them to DATE
or DATETIME
fields now? Read on!
Just a heads-up to save a lot of time investigating Google Chrome caching issues… Chrome won’t cache pages on https with an invalid SSL certificate!
Continue reading ‘Chrome Won’t Cache Pages With Invalid SSL Certificates’ »
There is more than one way to copy a table in MySQL, but if you want to include column attributes and indexes defined in the original table you’ve got to choose the correct one!
Continue reading ‘MySQL Copy a Table Including Attributes’ »
When fighting spammers or other unwanted traffic it’s useful to be able to block a top level domain, such as ukhost4u.com
or uk2.net
. This needs to be extracted from the full hostname, which might be something like 123-456-789-10.ukhost4u.com
. To do that you’ll need a combination of a PHP built-in function and a regular expression.
Continue reading ‘Extract Domain Name From Hostname in PHP’ »
Want to block email from specific countries? Want to check a visitor’s country within your PHP script? It’s all quite easy using this free IP-to-country DNS mapping service!
MySQL Tables Can Crash!
I didn’t know until it happened to me recently, but MySQL tables can crash. When one of my tables crashed the first I knew about it was when I tried to browse it using phpMyAdmin and received an error message.
Ever wanted to test a regex (regular expression) quickly and easily? Now you can!
Microsoft Word .docx Problem
As of Word 2007, Microsoft Office introduced a new file format (and extension) for Word, Excel, and PowerPoint documents. Prior to this, Word documents had the .doc extension, but new documents end in .docx. This can be a problem if you have a version of Microsoft Word prior to 2007, as there is no support for the new .docx format, and if someone send you a file in this format, you can’t open it!
Ever had trouble dropping onto a new line in Excel? I had tried all sorts of ways to insert a new line into an Excel spreadsheet without success.
The Apache web server’s mod_rewrite module is a powerful tool for rewriting URLs. It can catch you off guard in certain situations. For example, if you’re matching a URL to rewrite or redirect to another, you may find that any query string is unexpectedly passed along, too.
Continue reading ‘Stop Apache mod_rewrite Appending Query String To Redirects’ »