Skip to content

Commit

Permalink
Changed DXCC Lookup to use Clublog.orgs API
Browse files Browse the repository at this point in the history
  • Loading branch information
magicbug committed Dec 28, 2014
1 parent 9982d79 commit f2ce40f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions application/controllers/logbook.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,13 @@ function search_result($id) {

// Find DXCC
function find_dxcc($callsign) {
$this->load->model('dxcc');
// Live lookup against Clublogs API
$url = "https://secure.clublog.org/dxcc?call=".$callsign."&api=a11c3235cd74b88212ce726857056939d52372bd&full=1";

$dxccinfo = $this->dxcc->info($callsign);
$json = file_get_contents($url);
$data = json_decode($json, TRUE);

foreach ($dxccinfo->result() as $row)
{
echo ucfirst(strtolower($row->name));
}
echo ucfirst(strtolower($data['Name']));
}

/* return station bearing */
Expand Down

0 comments on commit f2ce40f

Please sign in to comment.