now is there any way to directly call script from another site where i have stored them ?? like sometimes i get a nill value while calling script as my website goes down sometimes making the socket request to timeout and give me lua error .Is there is any way to do something like this ??
file = http.request("http://mysite.com")
if (file) then
loadstring(file)()
else
file = http.request("http://mysite2.com")
if (file) then
loadstring(file)()
else
return closeCE()
end
end
_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy!
function getFile(param)
local location = param or 'http://site1.com/';
if (not http) then
http = require("socket.http");
end
local file,response = http.request(location);
if (response == 200 and file ~= nil and file ~= '' and not(string.find(file,'html'))) then
return file;
else
if not(param) then
return getFile('http://site2.com/');
else
return closeCE();
end
end
end
local a = getFile();
print(a); -- Data which was receieved from one of the two sites.
_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum