PHP Socket Implementation and Webpage Downloader

This post reveals two handy PHP constructs I’ve been using for a while now: a Socket class and a webpage-downloading function.
The files:

Socket.php (highlighted; plaintext)
webpage.php (highlighted; plaintext)

What good is a full-on Socket class and function, you may ask, when you can simply run file_get_contents with allow_url_fopen turned on? Well, consider that you want to send [...]

Rounded Corners at the Src

CSS-based rounded corner solutions are excellent for website layouts, but it’s just downright silly to envelope a single img tag with two to four extraneous divs just to get some nice rounded corners on that one image. PHP (with its GD library) is excellent for this purpose.

Image: Warped by ~eternicode (me).
My PHP script can [...]

I Love Me Some APIs

I love APIs. They make using web services so much easier.
I’ve been developing an IRC bot as a side project, and three of its functions require the use of web services. It can shorten urls using http://is.gd/, search google, and validate web pages using the W3C’s HTML and CSS validators. Fortunately, and [...]

Google Chrome Not Yet For Linux

Google recently announced and released their browser, Google Chrome. And, as should be expected, everyone is talking about it (QuirksMode, Dave Woods, and LifeHacker, amongst others). Unfortunately, it’s not yet available for linux. There’s promise that the developers are working on a linux port, and there’s a nice little textbox you can [...]

Stop the OpenDNS Address Bar Hijack

I started using OpenDNS a few weeks ago. One thing I immediately noticed was that OpenDNS was hijacking my address-bar-initiated google searches. You know that feature in FireFox that, if the words entered in the address bar don’t match a website, it takes you to the google search for those keywords? Seems [...]