diff --git a/application/controllers/update.php b/application/controllers/update.php
index 75425b53..decb6473 100644
--- a/application/controllers/update.php
+++ b/application/controllers/update.php
@@ -4,7 +4,8 @@ class Update extends CI_Controller {
/*
Controls Updating Elements of Cloudlog
Functions:
- dxcc
+ dxcc - imports the latest clublog cty.xml data
+ lotw_users - imports lotw users
*/
public function index()
@@ -160,5 +161,26 @@ class Update extends CI_Controller {
echo "
";
}
+
+ public function lotw_users() {
+ // Load Database connectors
+ $this->load->model('lotw');
+
+ $this->lotw->empty_table("lotw_list");
+
+ $lines = file('http://www.hb9bza.net/lotw/lotw1.txt');
+
+ // Loop through our array, show HTML source as HTML source; and line numbers too.
+ foreach ($lines as $line_num => $line) {
+ echo "Line #{$line_num} : " . htmlspecialchars($line) . "
\n";
+
+ $data = array(
+ 'Callsign' => $line,
+ );
+
+ $this->db->insert('lotw_list', $data);
+
+ }
+ }
}
?>
\ No newline at end of file
diff --git a/application/models/lotw.php b/application/models/lotw.php
new file mode 100644
index 00000000..8b74cb30
--- /dev/null
+++ b/application/models/lotw.php
@@ -0,0 +1,16 @@
+db->empty_table($table);
+ }
+}
+?>
\ No newline at end of file