Posts

Showing posts from June, 2017

Connect multiple database and call in code igniter

Hello here is code for connecting multiple database in Code igniter - First Open database.php file and make below code For First Database $active_group = 'default'; $query_builder = TRUE; $db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'root', 'password' => '', 'database' => 'test', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, 'db_debug' => TRUE, 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries'

Send push notification to Android and IOS from PHP

Hello here is code for sending push notification in android and IOS Php function for sending notification                                                                        $message="Your message";                                     $type='notification type';                                                                          $extra=array();                                     $extra['message']=$message;                                     $extra['type']=$type;                                     $extra['sound'] = 'default';                                     $this->common->sendPushNotification($receiverUserId,$extra); Send Notification in to android function sendNotificationToAndroid($deviceToken,$aps)          {             $apiKey = "4646464";                      $registrationIDs = array($deviceToken);             $url = 'https://android.googleapis.

Pay using ccavenue with webservice in php

- Here is code if you want to pay using cc avenue  with web service in php First Create function  in your controller                  public function paynow()              {                   if (isset($_REQUEST["pay_Request"]) &&                    trim($_REQUEST["pay_Request"]) != '')            {                         $register_request = $_REQUEST["pay_Request"];                         $register_request_decode = json_decode($register_request);                            if (isset($register_request_decode -> userid)                             && isset($register_request_decode->address)                             )                         {                             $data=array() //  if you want to pas custom parameters from                                                         controler                             $userId=$register_request_decode -> userid;                            $addre