View Full Version : Sending request and grabbing informations from another website

08-28-2009, 06:40 PM
Hello people.

I've been looking on this forum for a while for other people's problems etc. and finally got to register today. Although this is my first post, I'd like some help, because I can't seem to solve it myself.

I've searched the forums and only found one topic about this, but it seems like it didn't get resolved. What I want to do is post a form from my own website, which manipulates with another - and afterwards grab the information from the post result.

I've been searching around and read that regular expressions are being used. I'm not really familiar with those, but I can do the basics of it.

So the website I want to pull informations out from is the official MapleStory (a game) rankings. I'm coding this website for one of my friends, and this was one of his requests.
You type in a name on the rankings post form, and it grabs all the informations from the database. There's also an image of the character, which could be something like "AJJHSDMEWIOJOQWJASDGSDF ... .gif" and it changes everytime. I've seen this on other websites aswell - type in the character name, and it grabs everything. The character image, the class, level, world name, etc.

So I'm kinda lost on how to work with this. If anyone would help, I'd appreciate it.

By the way, the direct link to the ranking page is:

08-28-2009, 08:31 PM
I think you would want to use scraping to grab the data. And use preg_match() function with regular expressions to sort through the data and get what you want. You would have to do some googling around to see how exactly to do scraping I read an article the other day on it, I'll see if I can find it. Also there's lots of controversy on whether or not scraping is ethical but I think for that it would be fine.

08-28-2009, 08:44 PM
i grab user info from myspace, i have a demo (http://www.blueicestudios.com/myspace/) and source files (http://www.blueicestudios.com/grab-myspace-userinfo/) available.

08-28-2009, 09:03 PM
Thanks for your replies.

@firetag: I'll look into scraping, when I get the time.

@seco: It would be a simpler task to grab MySpace informations, because there's a direct link to the profile to grab stuff from, no?
I believe there's no exact URL to show each individual character on the rankings. I guess it's more complicated.