SPOOLDIR = "/var/spool" t = os.getenv("HOME") -- is $HOME set? t = t or os.getenv("TEMP") -- for Windows SPOOLDIR = t .. "/work" .. '/' .. (os.date("%Y-%m-%d")) -- strftime(3) http = require "socket.http" -- load library url = "http://www.qupps.biz/~jpm/cf" -- URI body, code = http.request(url) -- perform request if code == 200 then -- success local line = string.gsub(body, "\n", "") -- strip newlines SPOOLDIR = line end