Category Archives: Web Dev

Mobile Money

I’ve been want­ing to make an iPhone app for the Fake Name Gen­er­a­tor for months. The prob­lem is, I don’t own a Mac, an iPhone, and the half dozen devel­op­ers that have promised to make me an app haven’t actu­ally done so. To make it worse, the Android has come out, cre­at­ing yet another plat­form [...]
Also posted in Money, My Sites | Leave a comment

SVG Barcode Generator

The past few days have been spent writ­ing a PHP class that will gen­er­ate bar­codes and save them as SVG files. This class is going to be used in an upcom­ing barcode-related web­site I’m building. Cur­rently it supports: UPC-A: The nor­mal bar­code you will see on most prod­ucts in the US. UPC-E: A smaller, com­pressed ver­sion of UPC-A. [...]
Also posted in My Sites | Leave a comment

Making Eclipse for PHP Useful

Out of the box, Eclipse for PHP is lack­ing a few vital features. Prob­lem: How do I run SQL queries in Eclipse? Solu­tion: The SQL Explorer plugin. To install: Go to Help->Install New Soft­ware. Add a new site called SQL Explorer with the URL http://eclipsesql.sourceforge.net/ Select SQL Explorer. Keep­ing click­ing Next/Finish until the plu­gin is installed. Prob­lem: Okay, I can run some queries [...]
Posted in Web Dev | Leave a comment

What is my IP?

This past week­end I found a fun domain name for a project: ipaddr.es. Yeah, it is miss­ing an “s” at the end, but I think it is still a fun domain. So I threw up a “what is my IP” style page and am hav­ing some fun with it. What makes IP Addr.es bet­ter than the com­pe­ti­tion? A [...]
Also posted in My Sites | Leave a comment

PIC Code Site

When my wife leaves town, I like to spend my time work­ing on web­sites. With her out of town check­ing out Rice Uni­ver­sity, I put some time into a project I’ve been mean­ing to do for a few months. A while back I found this site, a very old school ghetto PIC/CIC search site. Hav­ing had [...]
Also posted in My Sites | Leave a comment

PHP: mysql or mysqli?

As you may know, I’ve been spend­ing a lot of time try­ing to make the Fake Name Gen­er­a­tor as fast as pos­si­ble. I’ve started using a CDN, I’ve made minor code tweaks (like doing ++$i instead of $i++), added APC caching, and a bunch of other stuff, but still feel that the core of the [...]
Also posted in My Sites | Leave a comment

Save money AND make your site faster using a CDN

My most pop­u­lar web­site, the Fake Name Gen­er­a­tor, recently ran into two major problems: It was using too many server resources. It wasn’t as fast as I wanted it. To solve these issues, I turned to Sim­pleCDN and their awe­some “mir­ror buck­ets”. Basi­cally you setup a bucket, point it at your base URL (in my case, http://www.fakenamegenerator.com), then [...]
Also posted in My Sites, Reviews | Leave a comment

Fix capitalized words in a MySQL table

I got a sup­port request today for the Fake Name Gen­er­a­tor. A vis­i­tor ordered US addresses, and some of the cities came back in all caps and some nor­mal (e.g., FOLSOM and Folsom). After dig­ging into my code, I found that I was check­ing if a city name was in upper­case, and if so I was [...]
Also posted in My Sites | Leave a comment

Quick and Easy PHP WHOIS Script

I like to be able to type “whois somedomain.com” in my browser and have it bring up the WHOIS infor­ma­tion. The site I’ve been using has a captcha (annoy­ing) and has got­ten unre­li­able, so I wrote this quick and easy script to pull the full unfor­mat­ted WHOIS data for me: <?php $d = isset($_GET['d']) ? $_GET['d'] [...]
Posted in Web Dev | Leave a comment

Automatic JS Broken Image Replacement

It’s a sad fact of life, but some­times web­pages have bro­ken images. Wouldn’t it be nice if there were an easy way of auto­mat­i­cally replac­ing these bro­ken images? for (i = 0; i &lt; document.images.length; i++) { var img = document.images[i]; img.onerror = function (evt) { this.src = "broken-image.gif"; } }; This [...]
Posted in Web Dev | Leave a comment