المشاركات

عرض الرسائل ذات التصنيف API

Paytm Payment Gateway Integration in PHP - Example

صورة
Hi! In this tutorial, we will see how to integrate paytm payment gateway in php . Mobile wallets have become immensely popular in recent years and paytm is highly trusted among online customers. Many people use it every day for doing online recharges, DTH & other bill payments. It reduces the risk of exposing customer's banking credentials and credit card details to hackers. Therefore, Paytm is a good solution for online payments on your Website and Mobile Apps. Integrating the paytm gateway in your application is quite easy and below I'll show how to do it with php. Paytm Payment Gateway PHP Integration: If your application is based on php, then you don't have to go from scratch. You can quickly integrate paytm into the application using the paytm kit for php . It covers all the basics, you just have to download and use it in the following way. Step-1) Download Paytm Kit Download Paytm Payment Kit for PHP and extract its contents. Then move the 'Payt...

How to Get Country Name from IP Address with PHP

صورة
Hi! In this post, let's see how to get country name from ip address using php . When working on multilingual web applications, it is mandatory to find the geographic location of the visitors, so that you can provide the contents that match the specific location. Some websites even change country flags and themes accordingly. With PHP, you can get the visitor's IP easily, but unfortunately there's no way to get the country details from it. Hence, you have to rely on external web services to provide the location details. Here I'm going to show you how to find the country of visitors with the help of GeoPlugin API and PHP. Getting Country Name from IP Address with GeoPlugin: GeoPlugin is a free web service that provides geographical location of site visitors from IP. It offers various types of services like PHP, JSON etc., and in this tutorial, I'm going to use the JSON API to find the country name . You have to access the service with this url, http://ww...

Get JSON from URL in PHP

صورة
In this tutorial, I’m going to show you how to get json from url in php script . JSON has become a popular way to exchange data and web services outputs in json format. To send a HTTP request and parse JSON response from URL is fairly simple in php but newbies may find how to parse json difficult. Let's see how to build a php json parser script. For this script, I’m going to access Google MAP web service via API and get latitude and longitude co-ordinates for a location. Google map api produces both json/xml output. But for this example I’m going to get the json response and show you how to parse json object to retrieve the geo-metric details. Read more »

Get Zipcode From Address using PHP and Google Maps API

صورة
Hi! We were seeing about Google Maps API for a while, and today's post is also one on the line. In this tutorial, we are going to see how to get zipcode from address using php and google maps api . Sometimes you might have a large set of customers addresses without postal codes. In such cases you can rely on Google maps to provide the pin code you need. It serves queries related to addresses with less effort. So with the help of Google Maps Geocoding API you can easily extract the zip code from the address and I'm going to show you how to do it in php. PHP - Get Zipcode from Address using Google Maps API: Retrieving zipcode/pincode from the address is a two step process. First we have to get the latitude and longitude for the given address and then use them to get the zip code details. The API offers two different types of services, geocoding and reverse geocoding of addresses and we have to use both to achieve the desired result. This is the web service url we have...

Get Address from Latitude and Longitude using PHP and Google Maps API

صورة
Hi! Today let's see how to get address from latitude and longitude using PHP and Google Maps Geocoding API . In general, the process of converting geometric coordinates such as latitude and longitude into address is called reverse geocoding . And the geocoding is just the opposite, converting address into latitude and longitude which we have seen in our previous tutorial. Google Maps provides a separate Geocoding API for the purpose and let's see how to use it with php. To obtain physical addresses from the API, you have to send http request along with latitude and longitude values. Getting Address from Latitude and Longitude using Google Maps: To access Google Maps Geocoding API , you need an http interface through which you can send and receive an http request/response from the api. Here is the sample request you should send to the web service. http://maps.google.com/maps/api/geocode/json?latlng=40.6781784,-73.9441579 The 'latlng' parameter must be used t...

Get Latitude and Longitude from Address using PHP and Google Maps API

صورة
Hi! In this tutorial, let's see how to get latitude and longitude from address using google maps geocoding api and php . Geocoding is the process of converting physical addresses into geographical coordinates such as latitude and longitude so you can use them to create markers in Google Map. It is also better to provide latitude and longitude when using Google Map API so that you can point to accurate position on the map. To obtain the geocode, we must send an http request to the Google Map Geocoding API along with the formatted address. How to Get Latitude and Longitude from Address? The Google Maps Geocoding API is a web service used to obtain geocoding and reverse geocoding of the addresses. And you have to access the api through the HTTP interface. Here is the sample request you have to send to Geocoding API to get latitude and longitude coordinates. The API provides a response in both json and xml format. Since json is cross platform compatible, let us inform the ...

Create 3D Pie Charts with JavaScript and Google Charts API

صورة
Google Charts API provides you with ready-made charts which you can generate with few lines of java script code. I'll show you here how easy it is to Create 3D Pie Charts with JavaScript and Google Charts API . For this chart tutorial we are going to use Google's Visualization API which is based on pure HTML5/SVH technology, so you don't need extra plug-ins. The pie chart we generate is an interactive chart , which means the user is allowed to interact with them by triggering events like mouse over, clicking, zooming, panning and much more (depends upon the charts we use). This method is relatively simple and does not require any complex server side scripts like PHP or any Databases. Using java script we will make callback to the Google Visualization API with the data set we want to render as a pie chart. The charts will be generated at the time of presentation. So if you want to generate charts from database tables , you can simply make it by querying the data...

Take Webpage Screenshot using PHP and PageSpeed Insights API

صورة
Hi! Today I have come up with an interesting post which is about taking screenshot of webpage using PHP and Google PageSpeed Insights API. This handy feature will help you provide thumbnail preview of websites to improve user experience on your sites and applications. There are several third-party screen capture APIs and Plugins available in the market but here I'm going to show you a very simple solution. Yep that is to use Google PageSpeed Insights API to capture screen shot. And the fact that it doesn't requires registration or apikey is really good. In general, Google PageSpeed Insights API is used to measure site performance. But you can also use it to capture screenshot of the website / webpage from a url. Let's see how to get the website screen shot from url using PageSpeed Insights API in PHP. Using Google's PageSpeed Insights API: Using Google PageSpeed Insights API to grab the webpage screen shot is very easy. All you have to do is call the api w...

URL Shortener Service using PHP and Google API

صورة
Hi! In today's post we will see about creating URL Shortener service using PHP and Google API . Google provides tons of APIs for users to easily complete several complicated tasks. And Google url shortener service (goo.gl) is one among them. In the past I have discussed about some other APIs like youtube api and google finance api . Now I'm going to show you about using google url shortener api service and generate shorten url using php. Google URL Shortener API: The Google URL Shortener is a service that takes long URLs and makes them short with fewer characters to make the link easier to share on social networks or by email. With Google's URL Shortening API, you can create these short urls programmatically by sending the long url through the http request. Please note that the API has a daily limit of 1,000,000 requests for free - more than that goes to your billing. In order to use google url shortener api, you must first get the api key and have to tag it wit...

SMS Gateway API Integration in PHP - Sending Text Messages

صورة
Hi! In this tutorial, we'll look at how to integrate sms api in php and send bulk text messages using simple php script . These days, increasing number of web applications uses SMS feature for product promotions, user authentication or sales and event notifications directly through their mobile phones. To send sms via php, you need to integrate an appropriate SMS gateway provider in your application. There are a number of SMS Service providers in the market and they offer APIs in various programming languages. Here I'm going to show you how to integrate Textlocal SMS gateway in PHP. Read: How to Create AJAX Search Engine using PHP and MySQL Textlocal SMS API: Textlocal is a bulk sms gateway that offers an easy and powerful messaging platform. It helps you maintain massive contact lists, compose rich multi-media messages and send sms in bulk. It has flexible APIs supporting different programming platforms. Register with SMS Gateway: In order to use Textlocal sms ga...