I'm developing a script that logs the players who join the game, here's what I have so far...
local hs = game.HttpService
local url = "http://--SNIP--/currentusers.php"
local data = {
["name"] = player.Name,
["userid"] = player.UserId
}
data = hs:JSONEncode(data)
gotback = hs:PostAsync(url, data)
data = hs:JSONDecode(data)
print("successfully ammended "..player.Name..","..player.UserId.."to the php file as string!")
I have absolutely no clue how to get "name" and "userid" to be sent as string to the php file, and stay there. I don't know if I'm even on the right track, or completely off. Please let me know!
Thank you!

1 comment
Closing this question as you are asking a PHP related question, not Lua. However, see this link for info to help you: http://stackoverflow.com/questions/9597052/how-to-retrieve-request-payload