Jump to content

Getting text contents from internet site?


jkub

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...