I'm using Lua for web development.
How do I retrieve URL (get) variables?
For example http://example.com/?varA=999
Psuedo Lua code:
local varA = url.get(varA); -- varA =
I'm using Lua for web development.
How do I retrieve URL (get) variables?
For example http://example.com/?varA=999
Psuedo Lua code:
local varA = url.get(varA); -- varA =
If you are running your Lua code in Lua, you can use request_path() and request_uri() to read the URL, and global _GET for a parsed version that correspond to the URL get variables you mention.
Lua's standard library doesn't do networking. Check out LuaSocket.