Skip to content

Instantly share code, notes, and snippets.

Last active Jan 20, 2019
What would you like to do?
suggested wspr polling interface
//get start parameter (intval returns 0 for bad integer values)
$start = intval($_GET["minid"]);
//create database connection (assuming some sort of mysql is uses)
$db = new mysqli("localhost", "root", "root", "wspr");
//query the data, limit might be modified
$res = $db->query("SELECT * FROM `spots` WHERE `spot_id` > ".$start." LIMIT 0, 1000;");
//check database result
if (!$res) {
echo "database error\n";
//dump the data as csv
while ($row = $res->fetch_row()) {
echo implode(",", $row)."\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment