• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

function to open file ?

xavierek

New Member
Joined
Apr 11, 2009
Messages
209
Reaction score
0
hello i try to open file in lua only this file is under URL adress ;) in php its work in lua i get null i try to make its like


PHP:
local file = io.open("http://myfile", r)
and its dont work some idea ?
 
i dont need curl :S ? curl is to use POST :( i thing xD


I have txt file under URL Lika http://www.domena.pl/mojplik.txt its must me some function like in php URL to file ;) Only uncle google gets for me to little information about it

in PHP i make it that :P

$data = file_get_contents($url);
and i have all data from url under verible :)


returns the file in a string or some like that ?
 
Last edited:
It requires additional library - luasocket.

If you're sitting on windows, there is already package containing this lib - OTAL (Open Tibia Advanced Lib), otherwise you need to visit luasocket site, and compile/download libs for linux.
 
i try too put in tfs 0.4 False

NO bady like windows we must use it becouse all cool programs its for it :D


i think for me better idea and faster its make on mysql quary :P


i dont have data.lua or global.lua to instal otal :S

ok i install luasocket some one can help me how make URL source to string in verible :)

some one ?
 
Last edited by a moderator:
Back
Top