The cqGMA Reference API provides information about:
https://www.cqgma.org/api/ref/?REFERENCE
---
https://www.cqgma.org/api/ref/?DA/NI-099
https://www.cqgma.org/api/ref/?DLFF-0125
https://www.cqgma.org/api/ref/?EU-022
https://www.cqgma.org/api/ref/?DE0136
https://www.cqgma.org/api/ref/?FED 009
or
https://www.cqgma.org/api/ref/?FED-009
https://www.cqgma.org/api/ref/?DL-00319
https://www.cqgma.org/api/ref/?NBN-047
https://www.cqgma.org/api/ref/?X53965
---
https://www.cqgma.org/api/castle/?DL-00136
https://www.cqgma.org/api/island/?EU-066
https://www.cqgma.org/api/lighthouse/?FED-101
https://www.cqgma.org/api/mill/?X53965
https://www.cqgma.org/api/summit/?DA/NI-096
https://www.cqgma.org/api/wwff/?DLFF-0126
---
{
"reference": "DLFF-0125",
"name": "Nature Park TERRA vita",
"latitude": "52.26815796",
"longitude": "8.35510254",
"locator": "JO42EG",
"reftype": "WWFF"
}
---
<?php
function ref_info($ref)
{
$url = 'https://www.cqgma.org/api/ref/?' . urlencode($ref);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_URL, $url);
$json = curl_exec($ch);
curl_close($ch);
return $json;
}
$json = ref_info('DLFF-0125');
$data = json_decode($json, true);
echo $data["name"];
?>
---
Example dialogue application:
https://www.adventureradio.de/cqgma/reference_info.php
---
$json = ref_info('NBN-019');
$json = ref_info('DL-05279');
$json = ref_info('DM/NS-108');
$json = ref_info('DLFF-0125');
$json = ref_info('EU-126');
$json = ref_info('DAI/NI-010');
$json = ref_info('X29821');
$json = ref_info('DE0067');
$json = ref_info('518');
---
The API accepts different ARLHS formats:
FED-101
FED 101
FED+101
---
<?php
function summit_info($ref)
{
$url = 'https://www.cqgma.org/api/summit/?' . urlencode($ref);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_URL, $url);
$json = curl_exec($ch);
curl_close($ch);
return $json;
}
$json = summit_info('DM/NS-108');
var_dump(json_decode($json, true));
?>
---
CQGMA Website:
https://www.cqgma.org
Support:
support@cqgma.org
---