Starting the Zend Framework 2 Session Manager

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

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);