1

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 = 
1
  • 5
    What lua framework / server ? Commented May 15, 2011 at 4:28

2 Answers 2

2

Lua's standard library doesn't do networking. Check out LuaSocket.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.