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

View Entire Topic
  • [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 are not allowed to view this content.
;
preload icon
preload icon
preload icon