removed hamli files
这个提交包含在:
父节点
c894b0f850
当前提交
29730632bf
共有 1 个文件被更改,包括 0 次插入 和 65 次删除
|
|
@ -1,65 +0,0 @@
|
||||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
||||||
|
|
||||||
class Hamli {
|
|
||||||
|
|
||||||
/*
|
|
||||||
Communicates with the ham.li API functions
|
|
||||||
*/
|
|
||||||
|
|
||||||
public function callsign($callsign)
|
|
||||||
{
|
|
||||||
ini_set ('display_errors', 1);
|
|
||||||
$jsonurl = "http://search.ham.li/api/call/".$callsign;
|
|
||||||
|
|
||||||
$json = @file_get_contents($jsonurl,0,null,null);
|
|
||||||
$json_output = json_decode($json);
|
|
||||||
|
|
||||||
if(isset($json_output)) {
|
|
||||||
|
|
||||||
foreach ($json_output as $name => $callsign) {
|
|
||||||
|
|
||||||
if(isset($name)) {
|
|
||||||
$data['callsign'] = strtoupper($name);
|
|
||||||
} else {
|
|
||||||
$data['callsign'] = $callsign;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($callsign->first_name)) {
|
|
||||||
$data['name'] = $callsign->first_name;
|
|
||||||
} else {
|
|
||||||
$data['name'] = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(isset($callsign->gridsquare)) {
|
|
||||||
$data['gridsquare'] = $callsign->gridsquare;
|
|
||||||
} else {
|
|
||||||
$data['gridsquare'] = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($callsign->city)) {
|
|
||||||
$data['city'] = ucfirst(strtolower(($callsign->city)));
|
|
||||||
} else {
|
|
||||||
$data['city'] = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($callsign->latitude)) {
|
|
||||||
$data['lat'] = ucfirst($callsign->latitude);
|
|
||||||
} else {
|
|
||||||
$data['lat'] = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($callsign->longitude)) {
|
|
||||||
$data['long'] = ucfirst($callsign->longitude);
|
|
||||||
} else {
|
|
||||||
$data['long'] = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
return $data;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* End of file hamli.php */
|
|
||||||
正在加载…
在新工单中引用