Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD and RPG Webmasters (http://www.topmudsites.com/forums/forumdisplay.php?f=13)
-   -   Pulling information from MUD to website (http://www.topmudsites.com/forums/showthread.php?t=6691)

ww_crimson 02-02-2012 11:23 PM

Pulling information from MUD to website
 
What's the easiest / most efficient way to pull information from the MUD and put it on the website.

For example : Current list of online players

Would also like to get all of our helpfiles online in the near future as well.

I'm pretty sure this should be done with a PHP/mysql database, but am kind of at a loss of where to look. Anyone have some references they can point me to?

Zeno 02-03-2012 12:22 AM

Re: Pulling information from MUD to website
 
Easiest? Probably having code regularly dumping that info to a txt file and having a symbolic link to it in public_html.

Gatz 02-06-2012 10:01 AM

Re: Pulling information from MUD to website
 
What Zeno said basically. NarutoMUD does just that. If you go to we do a couple of techniques. Firstly, dumping that data to a text file and parsing it on the fly, second is just opening a socket via PHP and using a home rolled protocol I called MRP (MUD Request Protocol) which works a bit like MSSP. The helpfile/skills section works like that and the Bingo Book section uses MRP.

If you store your helpfiles in a database (like MySQL) then obviously you'll want to do a query against it and use something like PHP (or JSTL or whatever) to parse it and send it to the user, but if you store your helpfiles like 99% of MUD engines do in files then you might just want to write out that file in a special folder viewable by your website (somewhere in the public_html). Then do some research on REGEX and be able to use one to troll your data file and rip out what you want.

The last bit I did, as a party bonus, was to convert the SMAUG style color tags to HTML color tags, but that is done on the fly and I did that as a last step of polish.

I hope some of that helps, and good luck! I think adding content to your website dynamically like that adds a lot of extra value for players.

Markov_AU 02-06-2012 11:42 AM

Re: Pulling information from MUD to website
 
Text dump, or if you used a database (sql etc) you may be able to pull straight form that database for the site.

ww_crimson 02-06-2012 03:23 PM

Re: Pulling information from MUD to website
 
Thanks for all the replies everyone. Coding is unfortunately not a strong suit of mine (still learning) but after posting this thread I remembered that one of our long time players does web development stuff for a living. He was able to put together some basic stuff for me that works well enough for now. It's not beautiful and it's not flawless, but it works.




A lot of the help files are being rewritten and cleaned up as they've been neglected for a few years. I've got another .php page with a searchable function.. just not sure which one I want to use. Maybe both. We'll have an "online players" page soon enough too. Nice to see the forum being so helpful :)

Ghostcat 02-07-2012 03:14 AM

Re: Pulling information from MUD to website
 
Gee, where have I heard that before? xD

dentin 02-07-2012 10:37 AM

Re: Pulling information from MUD to website
 
I don't know about the easiest, but the most efficient (if you're going for generated pages) is definitely to serve them directly out of the mud server on a second http port. That's what we do on Alter Aeon, and it guarantees that whatever is exported out of the http interface is current and synced with the actual server state:






-dentin

Alter Aeon MUD

ww_crimson 02-07-2012 03:24 PM

Re: Pulling information from MUD to website
 
? .. is that a common thing around here? We were down for about 10 months and prior to that the IMPs were basically missing for a year. I was able to get in touch with one of them again and we've really started turning things around.



Dentin -- I love the way that looks but have no idea how to do it :confused: . I'll stick with what we have for now but might look into that more later. Love your guys' website in general btw. I read your article on gold/mud economy. Absolutely fascinating work.

Ghostcat 02-07-2012 09:01 PM

Re: Pulling information from MUD to website
 

It's at least been true for just about every MUD, ever.


All times are GMT -4. The time now is 08:02 AM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022