Free QR API locate google maps address.
With this API you can insert a QR in your web page that redirects to a google address.
For example, if you want to get any writed address, now is not necesary rewrite in your mobile device to find or navigate to this address. The only you need is scan this QR and mobile device gets the correct address.
To call this API and obtain your QR you only need to get this url:
http://devel.farebookings.com/api/qrlocator/{address}
Example:
get QR for Leeds:
http://devel.farebookings.com/api/qrlocator/Leeds
get QR for Luton airport:
http://devel.farebookings.com/api/qrlocator/Luton airport
PHP usage;
<?php
$address = "Leeds";
echo curl("devel.farebookings.com/api/qrlocator/".$address);
function curl($url) {
$ch = curl_init();
$timeout = 0;
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_USERAGENT , "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)");
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
?>
Raul Torrico.
Web developer.
Farebookings.com
No comments:
Post a Comment