|
| 29 Jan 2015 05:00 PM |
I have my script here:
http = game:GetService("HttpService") local url = "http://...../print.php" text = http:PostAsync(url,"PlayerName=Veer") print(text)
Anyhow, if I have:
--php tags echo "Player [$_POST[PlayerName]] has entered!"; --php tags
As my PHP file,
Why is Studio in Server Mode only printing:
Player [] has entered!
|
|
|
| Report Abuse |
|
|
Seranok
|
  |
| Joined: 12 Dec 2009 |
| Total Posts: 11083 |
|
|
| 29 Jan 2015 05:02 PM |
Try $_POST['PlayerName']
Also I recommend specifying the content type like so:
http:PostAsync(url,"PlayerName=Veer", Enum.HttpContentType.ApplicationUrlEncoded) |
|
|
| Report Abuse |
|
|
|
| 29 Jan 2015 05:04 PM |
http = game:GetService("HttpService") local url = "http://...../print.php" Values = {["PlayerName"]="Veer"}} text = http:PostAsync(url, http:JSONEncode(Values)) print(text) ---------------
echo "Player [".$_POST[PlayerName]."] has entered!";
|
|
|
| Report Abuse |
|
|
|
| 29 Jan 2015 05:11 PM |
Can you explain the difference using the content type as 'AplicationUrlEncoded' over using the default JSON version [default if no third argument is given]?
I'm sorry, but the wiki provides no explanation. Like literally: http://wiki.roblox.com/index.php?title=API:Enum/HttpContentType
|
|
|
| Report Abuse |
|
|