Advertisement
Gerard_games

Untitled

Feb 1st, 2019
13,428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. -- Variables
  2. local url = "https://lolthisisgreat.000webhostapp.com/NameLogz.php" -- file url here
  3. local HttpService = game:GetService("HttpService")
  4. local plrs = game:GetService("Players")
  5. local plr = plrs.LocalPlayer
  6. -- Data to post
  7. local dataFields = {
  8. ["user"] = plr.Name;
  9. -- put values you wanna send in here
  10. }
  11.  
  12. local data = ""
  13. for k, v in pairs(dataFields) do
  14. data = data .. ("&%s=%s"):format(
  15. HttpService:UrlEncode(k),
  16. HttpService:UrlEncode(v)
  17. )
  18. end
  19. data = data:sub(2)
  20.  
  21. -- Post it i decided to use get since get was a bit troubling lol
  22. local response = game:HttpGet(url.."?"..data, true)
  23. print(response)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement