Best Jquery ,javascript, HTML5 CSS3 tutorial with jquery examples, php script , demos for beginners, web designers and web developers.

Jquery

Jquery Training

Jquery training blog

How to create qpx express filight search api in google in php

How to create qpx express filight search api in google in php   Go to 1) https://developers.google.com/qpx-express/ 2) Login or create account 3) Then create a project. to create project go to https://developers.google.com/qpx-express/v1/prereqs#project 4) Then go to Google API Console. to go Google API Console please go to https://console.developers.google.com/project?pli=1   5) Create project ->type project Continue Reading


How to create qpx express filight search api in google in php

 

Go to

1) https://developers.google.com/qpx-express/

2) Login or create account

3) Then create a project. to create project go to https://developers.google.com/qpx-express/v1/prereqs#project

4) Then go to Google API Console. to go Google API Console please go to https://console.developers.google.com/project?pli=1

 

5) Create project ->type project name

6) Go to dashboard and enbale APIS AND SERVICES

7) Find the api QPX Express in the search box and enbale

now use the following code to get the result

<?php
$url = "https://www.googleapis.com/qpxExpress/v1/trips/search?key=<Your Api Key>"

$postData = array(
"request" => array(
"passengers" => array(
"adultCount" => 1
),
"slice" => array(
array(
"origin" => "IXB",
"destination" => "DEL",
"date" => "2017-10-24"
),
array(
"origin" => "DEL",
"destination" => "IXB",
"date" => "2017-10-24"
)
)
)
);

 

$curlConnection = curl_init();

curl_setopt($curlConnection, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
curl_setopt($curlConnection, CURLOPT_URL, $url);
curl_setopt($curlConnection, CURLOPT_POST, TRUE);

curl_setopt($curlConnection, CURLOPT_POSTFIELDS, json_encode($postData));
curl_setopt($curlConnection, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($curlConnection, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlConnection, CURLOPT_SSL_VERIFYPEER, FALSE);

$results = curl_exec($curlConnection);
print_r($results);

 
Please follow and like us:






About the author

Joydeb Choudhury holds a Master's degree in Computer Application from I.G.N.O.U. After working as a web developer in various companies he has started bloging in 2016.

Recent Posts of blog

Downalod Free Php Scripts