• 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!

Lua Query Other DB

HeberPcL

[PowerOT.com.br]
Joined
Aug 21, 2007
Messages
1,292
Reaction score
51
Location
Brazil
GitHub
heberpcl
Guys, I have this little problem. I would run a query that is on an external server.
Does anyone have any idea how I can do it in LUA?


PHP:
	$host="myip.com"; //source
	$user="root";
	$password="pass";
	$db="mydbname";

[B]$ots->connect(POT::DB_MYSQL, array('host' => $host, 'user' => $user, 'password' => $password, 'database' => $db));[/B]

Example:
PHP:
db.query("UPDATE ...;", "host","user","password","database")

Thanks!
 
Using Luasocket you can fetch a webpage (and thus triggering your php page) with socket.http.request(url).
you can read more about Luasocket here
 
Back
Top