I am hosting a website on a webhost for a game. I wanted to test if my webhost could handle the ammount of requests my game would make. So I created a script that would send 500 requests per minute to my website.
It seemed to handle everything perfectly, but after a while de respondse would return ERROR_WINHTTP_INVALID_SERVER_RESPONSE. I googled it, and it ment that the server respondse could not be parsed.
PHP Code:
<?php
$json = file_get_contents("php://input");
$array = json_decode($json, true);
include "../MySQL/connect_to_mysql.php"; //Just an basic mysqli_connect()
$query = mysqli_query($link, "UPDATE playerData SET wins = wins + 1 WHERE PlayerID='".$array['playerID']."'");
echo mysqli_error($link);
mysqli_close($link);
echo $_SERVER['REMOTE_ADDR'];
exit();
?>
The in-game script just sends a HTPP PostAsync to this file, with an array which contains the playerID.
Is this an error in my php code or in my website configuration or in my code in my game? Also, how do I fix that error?