Detect AJAX Request in php

sometimes we are use single page for render html and response ajax request, so we need to detect ajax request or page render request.

In this article i would like to explain how to detect ajax request in Core PHP, Codeigniter and Zend framework and process your code.

Detect Ajax Request In Core PHP

This below code catch ajax request and provide event, so you can process your ajax operations.


How to Connect Multiple Database in Codeigniter

If you want to connect multiple database in single application with codeigniter, just follow below simple steps and setup configuration.

Set multiple database details in database.php file

You should provide all the database details in “application/config/database.php” file with defferent groups, like below examples.

Generally, you have to set default database group, like below code :


How To Setup IPN(Instant Payment Notification) in Paypal Account

Instant Payment Notification

Instant Payment Notification (IPN) is a message service that automatically notifies merchants by paypal for the transaction related events. Merchants can use this data for the further process of any order or other payment related action in his website.

How IPN works :

Merchants create a IPN data receiver page on their website and then this URL set in his paypal account. Paypal will send all the transaction related data on that given IPN URL. When any user place a order on merchant website and complete payment from paypal then after complete payment paypal send user transaction detail send on merchant IPN listner URL and merchant process user transaction data for user order on his website.

Setting Up IPN on PayPal

The below process describe how to setup IPN in your paypal accounts for sandbox and Live both. Please follow below instructions to set up your IPN listener in your account: Readmore

Send Windows Push Notification Services (WNS) using PHP

Windows Push Notification Services (WNS) is a service to send push notifications from server to the any windows  application. using the WNS you can send toast, tile, badge, and raw updates from their own cloud service. WNS provide mechanism to send updates to your users in a power-efficient and dependable way.


Creating MySQL Database Table for store user device ids

  1. create database table for store user information and Device Notify URL.
  2. After create table you will store user information and user device notify url. The notify user provided by app developer, this is a user device unique url.


Preview Selected Image before upload using Jquery

In this article explain how to show preview of selected image without upload. Here I am explain how to preview selected image without uploading image file. You can see preview your selected image using the jquery FileReader elements.

Below show the preview of demo script, if you want to integrate please just follow simple steps and see result.
Preview Selected Image Readmore