#} #echo "GET size=", count($_GET), "\n"; #foreach ($_GET as $i => $value) { #echo $_GET[$i], "\n"; #} #echo "------------------------------------\n"; if (connectToDb() == 1) { if ($_POST['mode'] == "test") { echo "Test successful. User="******"add") { echo addScore($_GET['user'], $_GET['score'], $_GET['desc']); } elseif ($_POST['mode'] == "add") { echo addScore($_POST['user'], $_POST['score'], $_POST['desc']); } elseif ($_GET['mode'] == "rss") { echoRSS(); } else { ?> <html> <head> <title>Scourge High Scores</title> <link rel=StyleSheet href="scourge.css" type="text/css"> </head> <body> <?php # save the version of scourge sent: # echo $_SERVER['HTTP_USER_AGENT']; displayList(); ?> </body> </html>
} if (Utils::contains($errstr, 'already defined')) { return; } if (Utils::contains($errstr, "htmlParseEntityRef: expecting ';'")) { return; } if (Utils::contains($errstr, "invalid in Entity")) { return; } error_log("WARNING: " . $errstr); if (Utils::contains($errstr, 'Unexpected end tag')) { return; } // Utils::throw400("WARNING:$errno: $errstr"); } if (!isset($_GET['action'])) { Utils::throw400("Must set 'action'!"); } if ($_GET['action'] === 'scrape-html') { $retriever = RetrieverFactory::createHtmlScraperFromQueryParams($_GET); $feed = $retriever->go(); echoRSS($feed); } else { if ($_GET['action'] === 'reflect') { header('Content-Type: application/json'); echo Utils::reflectComponents(); } else { Utils::throw400("Undefine action '{$_GET['action']}'!"); } }