Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD and RPG Webmasters
Click here to Register

Reply
 
Thread Tools
Old 08-07-2002, 11:13 AM   #1
Fr0g
New Member
 
Join Date: Aug 2002
Posts: 3
Fr0g is on a distinguished road
I've noticed on some sites this:

We are currently rank #10
We need 8 votes to to move up a rank.

Does anyone know how to do this?
Fr0g is offline   Reply With Quote
Old 10-26-2002, 06:53 PM   #2
nass
Member
 
Join Date: Apr 2002
Posts: 128
nass is on a distinguished road
php (see )
nass is offline   Reply With Quote
Old 10-31-2002, 12:40 AM   #3
Lanthum
Member
 
Join Date: Oct 2002
Location: Suburbs of Chicago
Posts: 138
Lanthum is on a distinguished road
Send a message via MSN to Lanthum
Lanthum is offline   Reply With Quote
Old 05-29-2003, 06:10 AM   #4
Davairus
Member
 
Join Date: Jun 2002
Posts: 159
Davairus is an unknown quantity at this point
Uh well I've been trying to do the same thing with php, for the past 5 months, on and off, and I have been unsuccessful. So I would advise, if you just got the idea to do this, this is what you'll do:

1) Visit this thread
2) Buy some paracetamol
3) Go to php.net and read all their pages
4) Take paracetamol for your headache
5) Try to get various scripts that do web grabbing
6) See 4
Finally 5 months later
1200) Give up

It is possible, but I can't see an easy way. Maybe there isn't, or someone kind might have actually been of help? Sometimes it takes an evil mastermind to program supremely hard things, and evil geniuses like them don't usually help. I believe such scripts have been programmed by these people in the past for their MUDs. Notice how they manage to capture the name of the MUD before em too. Diabolically clever.

We could always bug Synozeer to death to make a user friendly page just to show the MUD's names and their votes. Or we could offer him 500 bucks or something. Hmm, I'll get my foghorn ready, you supply the chalkboard and I'll get someone to bring along a cat to scrape it. Those secrets will be mine... all miiinneee.... Sssssoonnn, my presssssciousssss..
Davairus is offline   Reply With Quote
Old 11-11-2003, 06:24 AM   #5
gth
Member
 
Join Date: Nov 2003
Posts: 50
gth is on a distinguished road
Poor Fr0g - not much help so far, eh?

What you are looking for is on various PHP help forums across the 'net - this is a very common question.  You are looking for a function called fopen() or file_get_contents().  If it sounds like I'm not 100% sure it's only because I'm trying to plan my approach to this exact same problem, with one sticking point:

I'd be surprised if TMS doesn't mind if, every time someone views a page on my site, my server downloads the TMS index - just to grab two numbers for my page ?!

I am hopeful that maybe a lesser detailed page exists somewhere on TMS that just lists the top 50 in a very basic format for others to work out their position and that of the prior mud.  So what about it, huh?  Any hidden URLs on TMS?

Without such a page, the painful task for you, mr. webmaster, is to use PHP to grope your way through all of the HTML on the ranking web page of TMS (whichever rank page your mud is listed on, hopefully) -- and grab the rank and votes of your mud and the one listed immediately before it.

Good luck!


PS:
gth is offline   Reply With Quote
Old 11-11-2003, 09:29 AM   #6
Kylotan
Member
 
Join Date: Jun 2003
Location: Nottingham, UK
Home MUD: Abattoir (Smaug)
Home MUD: ex-Jellybean (Smaug)
Home MUD: ex-Dark Chambers (Merc)
Posts: 174
Kylotan is on a distinguished road
Send a message via ICQ to Kylotan Send a message via AIM to Kylotan Send a message via MSN to Kylotan Send a message via Yahoo to Kylotan
You guys are making this sound sooooooo much harder than it is! Using CURL with preg_split() should make this pretty trivial.

As for whether TMS would mind you reading their page... I expect your website traffic is quite low compared to theirs anyway so I doubt it would be noticable. A simple XML version of the rankings might be nice though.
Kylotan is offline   Reply With Quote
Old 11-30-2003, 07:27 AM   #7
gth
Member
 
Join Date: Nov 2003
Posts: 50
gth is on a distinguished road
Well, there are various obstacles that you will need to check:

= Curl support compiled in?

= php version requirement for file_get_contents (4.3+, I think)?

= Security setting 'allow_url_fopen' set to 1, ie may open files via a URL?

Although I'm no expert, I'd agree the task isn't huge once you get the basics working.  Using and the examples for file_get_contents, strip_tags and even simple ones like fgets and htmlentities (for when you're testing) should get you across the line.

Hope that helps.
gth is offline   Reply With Quote
Old 12-16-2003, 07:29 AM   #8
halkeye
New Member
 
Join Date: Jan 2003
Name: Gavin
Location: Vancouver, Canada
Posts: 12
halkeye is on a distinguished road
Send a message via ICQ to halkeye Send a message via AIM to halkeye Send a message via MSN to halkeye
perl has so many built in libraries that make parsing webpages a snap (Well perl isn't a snap, but still)

PHP is not ment for command line apps, its been modified for peopel to write apps with, but its not designed that way in mind.

Perl is a good scripting language.

Or shell script (ksh,bash,sh,csh, tclsh, etc etc etc) works too, with help from curl and such.

As for cheating the systerm, don't.
halkeye is offline   Reply With Quote
Reply


Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 02:06 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2022