One way to start the session with Zend Framework 2 (2.0.3 dev) is as below written. 1 2 3 4 // public/index.php $manager = new \Zend\Session\SessionManager(); $manager->getConfig()->setCookieHttpOnly(true)->setName(’ac-session’); $manager->start();// public/index.php $manager = new \Zend\Session\SessionManager(); $manager->getConfig()->setCookieHttpOnly(true)->setName(‘ac-session’); $manager->start(); Start the session manager Get the session config object Set httpOnly cookies for better xss security Set your session name… Continue reading Starting the Zend Framework 2 Session Manager
jQuery niceDate plugin
After looking on the internet for a jquery or javascript plugin that converts machine dates to readable ones like 12.12.2012 -> 2 days ago, I decided to write on my own. Since I am not a good javascript programmer feel free to correct my mistakes. Features multilanguage, aware of language grammatics, easy to hack, available… Continue reading jQuery niceDate plugin
Zend Rest Client & Google Maps Geocoder API
Here is some quick example how to use zend framework rest client and google maps geocoder API together. 1 2 3 4 5 $client = new Zend_Rest_Client(’http://maps.googleapis.com/maps/api/geocode/xml’); $client->address(’Cesta Andreja Bitenca 68, 1000 Ljubljana’); $client->sensor(’false’); $res = $client->get(); print_r($res);$client = new Zend_Rest_Client(‘http://maps.googleapis.com/maps/api/geocode/xml’); $client->address(‘Cesta Andreja Bitenca 68, 1000 Ljubljana’); $client->sensor(‘false’); $res = $client->get(); print_r($res);
MySQL backup to Rackspace Cloud files, quick & dirty
After having deep thought about security, bad hardware and shit I decided to make some database backup for some of my clients. They wouldn’t provide any spare backup space so i decided to use my account on rackspace cloud. The file space was cheap enough so i do not charge my client for it (even… Continue reading MySQL backup to Rackspace Cloud files, quick & dirty
Zend Framework & ExtJS Grid – part 1
The old way to make a grid was very time consuming. Basically it is just copy paste but still there is a lot to rewrite. You have to take care of the actions, pager and maybe a filter. So i tried ext js grid. Since extjs renders the grid alone and looks a lot better… Continue reading Zend Framework & ExtJS Grid – part 1
prototype, scriptaculous Chained Select
For one of my projects i had to make some select boxes which would work in a chain. I had 500.000 inserts in mysql which should be found easily. So i implemented 5 chained select boxes. The first part of the project was not meant to be public so i limited my work to Firefox.… Continue reading prototype, scriptaculous Chained Select