JavaScript is required to use Bungie.net

#Septagon

7/30/2011 9:03:31 AM
27

Bungie.net PHP Parser Project

In an effort to relieve some of the [url=http://www.bungie.net/Forums/posts.aspx?postID=63693482]depression[/url] 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 [url=http://bnetmobile.site90.net/]over here[/url]. 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. [url]http://www.megaupload.com/?d=B807RYCC[/url] What it does: As an example, the [url=http://pastebin.com/g8LCvHza]HTML of the Community forum[/url], when fed into the "stuff", produces [url=http://pastebin.com/cjQQy0UX]a number of objects[/url] 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:[quote]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/Account/Profile.aspx?memberID=2758679")); var_dump($p);[/quote] 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!

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

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

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • [quote][b]Posted by:[/b] Steelflex It's times like this I wish I was more knowledgeable in the scripting, programming, ways. Looks incredible interesting though. [/quote] Just what I was thinking.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

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

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • [quote][b]Posted by:[/b] Steelflex It's times like this I wish I was more knowledgeable in the scripting, programming, ways. Looks incredible interesting though. [/quote] That's what I was going to say... Good thing I'm going to take some classes on these types of things.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

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

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

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

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • Looks complicated, but interesting. Very interesting.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • [quote][b]Posted by:[/b] dazarobbo Have fun![/quote]Thanks for sharing.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • [quote][b]Posted by:[/b] Count Blinkula So exactly what can we do with this? (graphically or code-wise, I only know basic PHP)[/quote]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

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • In english daz?

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

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

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • [quote][b]Posted by:[/b] dazarobbo [quote][b]Posted by:[/b] Count Blinkula So exactly what can we do with this? (graphically or code-wise, I only know basic PHP)[/quote]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[/quote] 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

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • 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.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • [quote][b]Posted by:[/b] 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.[/quote] I think I'll stick with science :] Thanks anyway dazarobbo

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • Awesome! Thanks for sharing. This looks really useful.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

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

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • 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!

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

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

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • Cool. Sucks that this thread didn't get a lot of attention.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • 0
    Crap. Now I must learn PHP. But where?

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • [url=http://www.w3schools.com/php/default.asp]Great site.[/url] [quote][b]Posted by:[/b] giggybyte Crap. Now I must learn PHP. But where?[/quote] [Edited on 08.13.2011 8:35 AM PDT]

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

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

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • [quote][b]Posted by:[/b] giggybyte Crap. Now I must learn PHP. But where?[/quote] [url]http://php.net[/url] [quote][b]Posted by:[/b] dazarobbo[/quote] 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

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • '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 [url=http://mercurial.selenic.com/]Mercurial[/url] or [url=http://git-scm.com/]Git[/url], and then put your code up on [url=http://bitbucket.org/]BitBucket[/url], [url=http://github.com/]GitHub[/url], or [url=http://code.google.com/]GoogleCode[/url]. And if using an SCM system doesn't fancy you, the least you could do is use a file upload service like [url=http://www.filedropper.com/]FileDropper[/url], instead of the abomination that is MegaUpload. I like cats.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • I thought this said "laser project". *leaves disappointed*

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • [quote][b]Posted by:[/b] Zealot Tony [quote][b]Posted by:[/b] 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.[/quote] I think I'll stick with science :] Thanks anyway dazarobbo[/quote] Yup.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

1 2
You are not allowed to view this content.
;
preload icon
preload icon
preload icon