public function getAction()
 {
     $apiparameters = $this->view->apiparams();
     //print_r($apiparameters);
     if (!array_key_exists('apicall', $apiparameters)) {
         echo "{'error':'No method was called!'}";
     } elseif (!array_key_exists('apikey', $apiparameters)) {
         echo "{'error':'Api Key missing!'}";
     } else {
         $db = Zend_Registry::get('db');
         $sql = 'SELECT * FROM pclive_apikeys where apikey="' . $apiparameters['apikey'] . '"';
         $result = $db->query($sql);
         $record = $result->FetchAll();
         if (count($record) == 1) {
             $request = '[' . json_encode($apiparameters) . ']';
             $url = $this->view->serverUrl() . $this->view->baseUrl() . '/api/';
             //$url ='http://localhost/projects/evendor/api';
             $params = array('jsondata' => $request);
             // key value pairs
             $response = CommonFunctions::processRequest($url, $params);
             //$this->getResponse()->appendBody("From getAction() returning the requested article");
             echo "<pre>";
             print_r($response);
             //print_r(json_decode($response));
             echo "</pre>";
             //exit;
         } else {
             echo "{'apikey_error':'Invalide Apikey'}";
             //exit;
         }
     }
 }