Post your best Lua script examples here

User avatar
By alonewolfx2
#4364 can you share your version?


Erni wrote:I am beginning to be (more) confused.
With the version of the webserver I have there is no problem with using a form and the get method.
If i use a form like this:

Code: Select all<form method="GET"><br><input type="text" name="data" value=Peter>
Number<input type="text" name="number" value=17><input type="submit" value="Get"></form>

I get the variable in the reqdata table

Code: Select all<?lua for k,v in pairs(reqdata) do print (k,v) end ?>


Now if you look at the link from 4 dec by adamip, you will see a different implementation with post and log.file, so I think we are working with different versions ?

Screenshot
User avatar
By gerardwr
#4373
Erni wrote:
can you share your version?


Sure here you go.
I realy think we need some kind of version numbering :geek:


I think you are using the 1st version that was shared by adamjp.

AFAIK the latest version is here, that's the one I am using, and the one that's published (as an update) in the 1st message of this topic:
https://github.com/MrAPierce/esp8266/bl ... s/init.lua
User avatar
By yes8s
#4377 More issues... Anybody got any ideas what is causing this?

I can reliably serve a html file (no embedded lua code) over a local network @ 192.168.1.x.

I configured my router to port forwarding to the esp. Now, When I try to access the same page over the web from my mobile network, the browser hangs - it displays nothing.

If I reduce the textual content in the html file from approx 2700 characters to about 1700 chars, it works every time.

There is nothing fancy in this test html file just basic headers, paragraphs and a table. It really appears to be a html file size thing when over the web.

I put debug prints in the web server code and I confirmed that both with local and remote connection I am getting to the end of the conn receive having transmitted all html file text but under remote connection I don't get to the conn sent for some reason.

Baffling...