To handle a lot of traffic, we need a fast controller with very little memory overhead. First, we implement a dynamic controller . The design is based on the micro frameworks Slim and Silex . The first example maps the URL "http://server/index.php/blog/2012/03/02" to a function with the parameters $year, $month and $day: // index.php, handle /blog/2012/03/02 $app = new App(); $app->get('/blog/:year/:month/:day', function($year, $month, $day) { printf('%d-%02d-%02d', $year, $month, $day); }); Our controller is a class named App and uses the get() function to map a GET request. Parameters mapped to the function are marked with a colon. Optional parameters are written inside brackets. Here is an example: // handle /blog, /blog/2012, /blog/2012/03 and /blog/2012/03/02 $app = new App(); $app->get('/blog(/:year(/:month(/:day)))', function($year=2012, $month=1, $day=1) { printf('%d-%02d-%02d', $year, $month, $day); }); Instead of ...