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

HttpPost/HttpGet - How does PHP handle this?

Asked by 5 years ago
Edited 5 years ago

Hey guys,

Currently i'm trying to send information to my website, via HttpPost and then get a return w/ HttpPost.

What im trying to do w/ Lua:

game:GetService'HttpService'.HttpEnabled = true HS = game:GetService'HttpService' data = {['name']=game.Players.LocalPlayer.Name,['UserId']= game.Players.LocalPlayer.UserId} json = HS:JSONEncode(data) json = 'data='..json print(json) a = game:HttpPost("Host.com/Sub" ,json) print(a)

or

game:HttpPost("Host.com/Sub","Player: ".."game.Players.LocalPlayer.Name"..", PlayTime: "..curtime())

what i've got in my php code

`<?php echo var_dump($_POST); echo $_POST['data'];

?>`

( As I saw in other posts)

or `<?php

echo $_POST['player'].$_POST['time'];

?>`

I was hoping someone could help me :s

0
Could you edit your post and throw in your PHP code here and try to embed your code again? Naxxanar 77 — 5y
0
lol this isn't PHP coding site User#19524 175 — 5y
0
"lol this isn't PHP coding site", Im trying to get php to interp the lua code shown. pl0x try agin SoulessKnowledge 2 — 5y

Answer this question