load->view('layout/header', $data); $this->load->view('dxcluster/main'); $this->load->view('layout/footer'); } /* loads custom spots based on band */ public function custom($band) { $data['page_title'] = "DX Cluster"; $data['band'] = $band; $this->load->view('layout/header', $data); $this->load->view('dxcluster/custom'); $this->load->view('layout/footer'); } /* returns formatted json for all spots */ public function all_spots() { $jsonurl = "http://www.dxcluster.co.uk/api/all"; $json = @file_get_contents($jsonurl,0,null,null); $json_output = json_decode($json); //print_r($json_output); $i = 0; foreach ($json_output as $name => $value) { echo ''; echo "".$value->mytime.""; echo "".$value->call.""; echo "".$value->freq.""; echo "".$value->dxcall.""; echo "".htmlspecialchars($value->comment).""; echo ""; $i++; } } /* returns formatted json for custom spots */ public function custom_spots($band) { $jsonurl = "http://www.dxcluster.co.uk/api/data_band/".$band; $json = @file_get_contents($jsonurl,0,null,null); $json_output = json_decode($json); //print_r($json_output); $i = 0; foreach ($json_output as $name => $value) { echo ''; echo "".$value->mytime.""; echo "".$value->call.""; echo "".$value->freq.""; echo "".$value->dxcall.""; echo "".htmlspecialchars($value->comment).""; echo ""; $i++; } } } /* End of file dxcluster.php */