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

Can't get PostAsync to work. Help?

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 it work when you post to the site from outside of Roblox? If not then it isn't Roblox. 1waffle1 2908 — 9y
0
Only approved sites can be used with HTTPService. deputychicken 226 — 9y

Answer this question