Important notice: OpenID2 for Google accounts is going away on April 20, 2015. Learn more.
Is it work using given the above?
Pete.
Erni wrote:Yes good idea with a more descriptive title
Just tried it with pushingbox (sending a email.), works fine
The only thing that needs change for others is devid=vxxxxxxxCode: Select allfile.remove("pushing.lua")
file.open("pushing.lua","w+")
host="api.pushingbox.com"
ipnr=0
file.writeline([[tmr.alarm(30000, 1, function()]])
file.writeline([[sk=net.createConnection(net.TCP, 0)]])
file.writeline([[sk:dns(host,function(conn,ip) ]])
file.writeline([[ipnr=ip]])
file.writeline([[end)]])
file.writeline([[conn=net.createConnection(net.TCP, 0) ]])
file.writeline([[ conn:on("receive", function(conn, payload) print(payload) end )]])
file.writeline([[ conn:connect(80,ipnr)]])
file.writeline([[ conn:send("GET /pushingbox?devid=vxxxxxxx HTTP/1.1\r\nHost: "..host.."\r\n"]])
file.writeline([[ .."Connection: keep-alive\r\nAccept: */*\r\n\r\n")]])
file.writeline([[end)]])
file.close()