Smart generation of Gzip files for nginx

Smart generation of Gzip files for nginx

As the complexity of today’s sites increases, so are the challenges to keep the site loading fast and bandwidth usage low. Minified scripts, concatenated CSS, image sprites and even hand-crafted static html are used for speedy delivery. This article discusses some less-known features of nginx that can lead to significant speed increase.

Full Story
Google Play developer’s woes

Google Play developer’s woes

I don’t get it. Everyone does it. Apple does it. Amazon, Blackberry, Samsung, Intel and a bunch of others I can’t even recall right now. Google doesn’t.

Full Story
Correct Name Capitalization in PHP

Correct Name Capitalization in PHP

One annoying scenario is when you let users enter their names and then you need to output their names nicely, for example in a newsletter. Some users simply enter their names in upper/lowercase, but obviously when you address them you can’t do the same. On the other hand PHP’s ucfirst() and ucwords() functions are too naive for proper capitalization.

Full Story
PHP Download Script with Resume option

PHP Download Script with Resume option

A while ago I wrote an article about the¬†common pitfalls of handling file downloads in PHP. One thing I did not realize at that time is that in most cases developers don’t have the time to write such a script and they’ll use whatever they can find, even if it has flaws. Because of this, I decided to write a download script and release it free for everyone with a BSD License. It’s not a class, just a script that accepts a “file” parameter via GET or POST and outputs the file. For security purposes any paths are stripped and replaced with a path in the script (the folder containing the downloadable file(s) should be protected against direct access).

Full Story
Hacker Events of 2011

Hacker Events of 2011

Contrary to popular conception, hackers are generally not solitary programmers working out personal offenses. Most of the high-profile attacks of 2011 were carried by groups of hackers working together, primarily LulzSec and Anonymous.

Full Story