jkub Posted April 11, 2011 Share Posted April 11, 2011 I have a home made welcome window in my server with several tabs. Ones for a list of admins, others for rules, for news etc... I find it really annoying that everytime I have to update something that I have do fetch the resource and manually update it by hand and FTP it back to the server. With that being said, is there a way I can write a script that automatically updates the welcome windows contents every 12 or so hours if needed? It would get the text contents from an external website and copy that information into the GUI. I looked at HTTP functions but I'm not sure thats what I'm looking for, nor do I know how to use them? Please help. Link to comment
qaisjp Posted April 11, 2011 Share Posted April 11, 2011 This is what I think: Firstly you would need to load the welcome window text from an XML file. This should be server side. Your server side should read the string then send it to the client using a event handler. Also add a requestHelp event handler (just a random name) requestHelp would look at the XML again then load it and then send it to the client for loading into gui text. The website should trigger this using HTTP functions. setTimer on this event can do it every 12 hours or so. You can make the xml editied using HTTP functions or you can give the website FTP access and simply edit and save the contents (whereas SUBMIT would trigger the requestHelp event) Hope this might help Link to comment
FFS-Racing Posted April 11, 2011 Share Posted April 11, 2011 Just store the data in MySQL db. Link to comment
jkub Posted April 12, 2011 Author Share Posted April 12, 2011 I have no idea how to do this though. I don't understand. Where do I put the HTTP files? @FFS-Racing. Not everyone knows how to use MySQL. Trust me though, I've spent hours trying to learn. Link to comment
qaisjp Posted April 12, 2011 Share Posted April 12, 2011 ^^jkub "Not everyone...." Yes same here, that is why I didnt reccomend mysql database Link to comment
proracer Posted April 12, 2011 Share Posted April 12, 2011 You must create database first and you can do it by registering on site which hosts free web-sites. Then you can read syntax for sql: http://dev.mysql.com/doc/refman/5.6/en/ Link to comment
eAi Posted April 12, 2011 Share Posted April 12, 2011 You can use callRemote and the PHP SDK. Link to comment
jkub Posted April 12, 2011 Author Share Posted April 12, 2011 Thanks guys, I will be trying to learn this for the moment. I will come back if I run into problems. I try to get text from the page, but it returns error. would I be able to get the text from an SMF forum post? instead of the whole page? Link to comment
qaisjp Posted April 13, 2011 Share Posted April 13, 2011 I think it is possible, but you would have to make it detect where to find it. Anythingis possible in lua Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now