send_message_to_url returns ERROR as only string

Users who are viewing this thread

if (isset($_GET['type']) and isset($_GET["id"])) {
        //proper request should be --
        if ($_GET['type'] == PLAYER_JOINED_EVENT) {
            if (!isRegistered($_GET["guid"])) {
                registerPlayer($_GET["guid"], $_GET["username"]);
                $id = $_GET["id"];
                echo "1|$id|0|0|0|0|";
            } else {
                $playerStats = getPlayerInfo($_GET["guid"]);
                $id = $_GET["id"];
                if ($row = $playerStats->fetch_assoc()) {
                    $guid = $row['guid'];
                    $kills = $row['kills'];
                    $deaths = $row['deaths'];
                    $money = $row['money'];
                    $rank = getPlayerRank($guid, "kills");
                    echo "1|$id|$guid|$kills|$deaths|$money|$rank|";
here's a short snippet of my code as player joins the server
called by lua script
local query = formatAPICall("api.php", {"type", "guid", "id", "username"}, {1, guid, player, game.sreg[44]})
    game.reg[45] = 100
(which is basically setting query to the url, setting reg45 to 100, and sending message to url query)
with query being (which is correct)
which returns the codes
however, in the receive_url method, the number of strings is 1 and number of int is 0, with the only string being "ERROR"
does anyone have any idea how to fix this
I used phpmyadmin with sql and loosely followed the instructions in this thread
Top Bottom