Hi friends, hope you are doing well. In today’s post i am going to share very useful API. After this post you will be know how to calculate distance between origin and destination using google map api in php.

This PHP scripts will get the distance and time estimation using google map API. Below is the google map API url Generate Google API Key.

google-map-api

Download      Demo

Step to create Google API Key

Before proceed forward you need to create google MAP API key. Click here to generate API Key.

On the below screen click on GET A KEY button to generate API KEY.
google-maps-directions-api-google-developers

In the below page click create and enable key button.
google-maps-directions-api-google-developers-step2

After the processing you will get the API Key. Your API key is generated her is an example API key YOUR API KEY :
AIzaSyAvSwwcLmQcJSHfqtMC3Tpzd3pM62tniLA .

google-maps-directions-api-google-developers-final-step

HTML Code

PHP Code to get Distance & Time estimate

Download      Demo