From 054eb0598e47126b2564446f8348e799a20106ba Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 14 Nov 2012 00:56:54 +0000 Subject: [PATCH] qrz fix --- application/controllers/welcome.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/application/controllers/welcome.php b/application/controllers/welcome.php index 3cb3eb0b..322bacf2 100644 --- a/application/controllers/welcome.php +++ b/application/controllers/welcome.php @@ -5,7 +5,25 @@ class Welcome extends CI_Controller { public function index() { - $this->load->view('welcome_message'); + //$this->load->view('welcome_message'); + + + // URL to the XML Source + $xml_feed_url = 'http://xmldata.qrz.com/xml/current/?username='.$username.';password='.$password.';agent=cloudlog'; + + // CURL Functions + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $xml_feed_url); + curl_setopt($ch, CURLOPT_HEADER, false); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $xml = curl_exec($ch); + curl_close($ch); + + // Create XML object + $xml = simplexml_load_string($xml); + + print_r($xml); + } }