Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How does PostAsync work?

Asked by 9 years ago

Well, I have made the PHP page which looks like this:

$raw_post = file_get_contents("php://info");
$json = json_decode($raw_post);

echo($json['Test']);

and the Lua script which is:

local s = game:GetService("HttpService");
local info = {
       Test = "Hello";
}
local json = s:JSONEncode(info);
local data = s:PostAsync("http://teamclarity.co/test.php", json);

while wait() do
print(data)
end

But it does not work and doesn't change my website's content.

Could you please help?

0
Does noone know? Fantastik00 0 — 9y

Answer this question