Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

You can incorporate REST services into BMP Interactions

I like cheese!

Sample Interaction Code
$debug = true;
$str = '';
$url = 'http://api.geonames.org/countryCode?lat=' . $args[0] . '&lng='
 . $args[1] . '&username=demo&type=JSON';
$t->fetch($url);
$data = json_decode($t->result, true);
if($debug)
 $str = "URL: {$url}<br /><br />

JSON: {$t->result}<br /><br />";

return $str . "Country name is {$data[countryName]}
<br />Country code is {$data[countryCode]}";

  • No labels