generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: HTTPService Help?

Previous Thread :: Next Thread 
DigitalVeer is not online. DigitalVeer
Joined: 23 Jun 2009
Total Posts: 4182
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 is not online. 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
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
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
DigitalVeer is not online. DigitalVeer
Joined: 23 Jun 2009
Total Posts: 4182
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image