Bungie.net Community
This topic has moved here: Subject: Bungie.net PHP Parser Project
  • Subject: Bungie.net PHP Parser Project
  • Pages:
  • 1
  • 2
  • of 2
Subject: Bungie.net PHP Parser Project

In an effort to relieve some of the depression around here, I figured I'd this might be something people would be interested in.

Some of you know about the mobile site I wrote up site over here. There is stuff going on behind the scenes there which converts a regular page on bungie.net to one of the equivalent ones you see on that site. What I'd like to share with everyone is the "stuff" which does that.

http://www.megaupload.com/?d=B807RYCC

What it does: As an example, the HTML of the Community forum, when fed into the "stuff", produces a number of objects for programmatic access.

Download is a standard .zip file which contains 14 .php scripts (or simply text files for the layperson). All of them contain class or interface definitions. Only one method performs I/O - BungieNetPost::ResolvePostID - which is a HEAD request to Bungie.net using cURL (it isn't called anywhere in any class file). Otherwise, none of the scripts will write or read.

Example usage:function __autoload($className){
require_once("../classes/" . $className . ".php");
}

$f = new BungieNetForum(file_get_contents("http://www.bungie.net/ Forums/topics.aspx?forumID=3"));
var_dump($f);

$t = new BungieNetTopic(file_get_contents("http://www.bungie.net/ Forums/posts.aspx?postID=15804986"));
var_dump($t);

$p = new BungieNetUser(file_get_contents("http://www.bungie.net/A ccount/Profile.aspx?memberID=2758679"));
var_dump($p);

Few notes:
- Tested on PHP 5.3.3 (earlier versions may have "difficulties").
- If you don't like the way things are parsed, you're welcome to change it.
- Some of the properties may/may not be used (if ever). Remember: what the scripts can access is dependent on what bungie.net makes available through HTML, so a lot of the time things will be null.
- From the example above, it can parse a forum, topic, or profile page, but a lot of what's in there can probably be reused for other things (eg. inbox, private group forums, etc...).

Standard/Obvious disclaimer: Use at your own risk. I am not responsible in any way for how you use what's provided (eg. getting yourself IP banned).

Have fun!

  • 07.30.2011 1:03 AM PDT

It's times like this I wish I was more knowledgeable in the scripting, programming, ways. Looks incredible interesting though.



  • 07.30.2011 1:19 AM PDT

"You dead yet? No? You will be!"

"How you like them pears? Guess what I mean by pears."

"I'm gonna rip off his partridge and kick him in the pear tree!"


Posted by: Steelflex
It's times like this I wish I was more knowledgeable in the scripting, programming, ways. Looks incredible interesting though.

Just what I was thinking.

  • 07.30.2011 1:29 AM PDT

cars, girls & cake all day everyday

So exactly what can we do with this? (graphically or code-wise, I only know basic PHP)

  • 07.30.2011 1:52 AM PDT

I don't always ban people but when I do I laugh uncontrollably...that's if I was a Forum Ninja.

Truth is a matter of perception.

The Button


Posted by: Steelflex
It's times like this I wish I was more knowledgeable in the scripting, programming, ways. Looks incredible interesting though.





That's what I was going to say...

Good thing I'm going to take some classes on these types of things.

  • 07.30.2011 1:59 AM PDT
  •  | 
  • Exalted Mythic Member
  • gamertag: Rokitz
  • user homepage:

Want to know more about me? Check out my Community Joes interview.

Trying something once will increace your chances of success, because you tried it. Try someting twice, and your chances increase yet again - seeing as you've done it. Try something a few thousand times, and your chances of success is exponentially increased; this increase would likely provide success every time

Thread saved, for when I get to finally have some free time and learn some programming. ...

>_>
<_<

  • 07.30.2011 2:02 AM PDT

"We live in a special time; the only time where we can observationally verify that we live in a very special time" - Lawrence Krauss.

I was a finalist :P

Stupid trend micro security saying that it is a dangerous link. Thanks dazarobbo for screwing with my internet security :]

  • 07.30.2011 2:15 AM PDT

Spread the love...

Looks complicated, but interesting. Very interesting.

  • 07.30.2011 2:41 AM PDT

Hi. My name is Sean. I've been a Bungie fan since Halo launched. Some of my interests include games, exercising, laser tag, martial arts, movies, music, sports, and technology. Feel free to contact me at any time.

cryptic@me.com | Facebook | Twitter | Xbox LIVE

Posted by: dazarobbo
Have fun!
Thanks for sharing.

  • 07.30.2011 2:50 AM PDT

Posted by: Count Blinkula
So exactly what can we do with this? (graphically or code-wise, I only know basic PHP)
Use it as a basis for making things. For example, you could fairly easily make something that looks through the contents of each post in each thread in each forum and searches for your username (assuming no "interruptions", so-to-speak).

Or make a better mobile site - that couldn't be too difficult :P

  • 07.30.2011 3:56 AM PDT

I run Skirmish!!!

that all looks cool, if only i understood it :p

  • 07.30.2011 4:12 AM PDT

"We live in a special time; the only time where we can observationally verify that we live in a very special time" - Lawrence Krauss.

I was a finalist :P


Posted by: dazarobbo
Posted by: Count Blinkula
So exactly what can we do with this? (graphically or code-wise, I only know basic PHP)
Use it as a basis for making things. For example, you could fairly easily make something that looks through the contents of each post in each thread in each forum and searches for your username (assuming no "interruptions", so-to-speak).

Or make a better mobile site - that couldn't be too difficult :P

Got to admit you are pretty good with assisting people with connection and computer problems
I take it you have a computing or engineering degree of some kind?

Anyway nice thread, but what would cause you to get IP banned while using this? (apologies my computing skills are as bad as anyone I have ever met

  • 07.30.2011 4:15 AM PDT

You would likely get IP banned if you made too many requests to bungie.net, especially within a short amount of time, as the server(s) would probably see it as a DoS.

  • 07.30.2011 4:34 AM PDT

"We live in a special time; the only time where we can observationally verify that we live in a very special time" - Lawrence Krauss.

I was a finalist :P


Posted by: dazarobbo
You would likely get IP banned if you made too many requests to bungie.net, especially within a short amount of time, as the server(s) would probably see it as a DoS.

I think I'll stick with science :]
Thanks anyway dazarobbo

  • 07.30.2011 5:11 AM PDT

Awesome! Thanks for sharing. This looks really useful.

  • 07.30.2011 9:11 AM PDT

if(!now){when();}
Bungie Favorite Author : Iris::1
Map

It would be nice if Bungie offered a public read-only mirror of their DB.

  • 07.30.2011 9:35 AM PDT

"Inveniam Viam Aut Facium" _~

if ( !now ){ when(); }

Nice, I now have the tools to start my b.net title booster bot! A few n-gram classifications, a Bayesian filter, and I am set!

  • 07.30.2011 9:42 AM PDT

Now, in the quantum moment before the closure, when all become one. One moment left. One point of space and time.

I know who you are.

You are Destiny.

I'll start playing around with this soon, thanks dazarobbo; I've seriously been looking for something like this.

  • 07.30.2011 12:40 PM PDT

*eats a sammich*

Crap.
Now I must learn PHP.
But where?

  • 08.13.2011 8:25 AM PDT

"I will show you how a true Prussian officer fights!"

"And i will show you where the iron crosses grow..."

- "Cross of Iron"

This would be a good start for learning how to program! Thanks.

  • 08.13.2011 8:41 AM PDT
  • gamertag: [none]
  • user homepage:

Yarr!

Posted by: giggybyte
Crap.
Now I must learn PHP.
But where?

http://php.net

Posted by: dazarobbo
That's some pretty cool -blam!- there. I wish I had more time to look over it, maybe when uni starts back and all these exam resists are over :( ps. DomDocument <3

  • 08.13.2011 9:45 AM PDT

'Robbo, I think it's time you learned how to use an SCM. I mean, packaging source code in a zip file... on MegaUpload? Really? Come on, now.

You should learn an SCM tool like Mercurial or Git, and then put your code up on BitBucket, GitHub, or GoogleCode.

And if using an SCM system doesn't fancy you, the least you could do is use a file upload service like FileDropper, instead of the abomination that is MegaUpload.

I like cats.

  • 08.13.2011 10:04 AM PDT

  • Pages:
  • 1
  • 2
  • of 2