while implementing http in lua code I am facing the problem.
for example : I tried the below one
local TEMPHTML = ""
local url ="http://www.dilbert.com/"
local objXMLHTTP = luacom.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP:Open ("GET",url , 0)
objXMLHTTP:Send()
TEMPHTML = objXMLHTTP.responseBody
objXMLHTTP = nil
it throws me a error like ,
attempt to index global 'luacom' (a nil value)
stack traceback:
try.lua:1: in main chunk
[C]: ?
Again i tried with other options like
extracting these files in lua directory..
-http.lua
-code.lua
-concat.lua
-url.lua
from luasocket-1.4.zip from :
http://www.tecgraf.puc-rio.br/luasocket/old/luasocket-1.4/
and put them in the lua directory...
then i tried the below one
local TEMPHTML = ""
local url ="http://www.dilbert.com/"
TEMPHTML = HTTP.get(url)
But it throws me a same error like ,
attempt to index global 'luacom' (a nil value)
stack traceback:
try.lua:1: in main chunk
[C]: ?
I have installed Lua for windows from http://www.lua.org/download.html
Please help me out to solve this,
Many Thanks in Advance
for example : I tried the below one
local TEMPHTML = ""
local url ="http://www.dilbert.com/"
local objXMLHTTP = luacom.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP:Open ("GET",url , 0)
objXMLHTTP:Send()
TEMPHTML = objXMLHTTP.responseBody
objXMLHTTP = nil
it throws me a error like ,
attempt to index global 'luacom' (a nil value)
stack traceback:
try.lua:1: in main chunk
[C]: ?
Again i tried with other options like
extracting these files in lua directory..
-http.lua
-code.lua
-concat.lua
-url.lua
from luasocket-1.4.zip from :
http://www.tecgraf.puc-rio.br/luasocket/old/luasocket-1.4/
and put them in the lua directory...
then i tried the below one
local TEMPHTML = ""
local url ="http://www.dilbert.com/"
TEMPHTML = HTTP.get(url)
But it throws me a same error like ,
attempt to index global 'luacom' (a nil value)
stack traceback:
try.lua:1: in main chunk
[C]: ?
I have installed Lua for windows from http://www.lua.org/download.html
Please help me out to solve this,
Many Thanks in Advance