• Welcome to Valhalla Legends Archive.
 

PHP Battle.net Stats Checker (Not sure what forum this belongs in).

Started by ProXie, April 24, 2005, 03:14 PM

Previous topic - Next topic

ProXie

Sorry, this thread could  belong in a number of different forums.  It sort of ties into Battle.net bot programming but if a moderator feels otherwise, feel free to move it.

Would it be possibly to somehow send a command to the Battle.net servers via a PHP script and have it return statistical info ( Wins, Loses, etc )? Has anyone seen a script like this?

Only method I can think of is having a bot work with the PHP script. I'm sure this is possible but thats a hell of a lot of code.

All help is appreciated.

Thanks,
Max

Blaze

Yes, you could create a socket and connect to the server of choice, select a chat connection, and then send the stats request.
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

ProXie

Sorry, I'm not familiar with sockets.  Would the socket run serverside?  Would it create a big load on the server?  Would it require a CDKey in order to connect?  Can it handle multiple connections one after another.

If this is a complicated job, I'd be interested in hiring someone to do it.  I have seen it done btw.

Blaze

I'm not too familiar with sockets either, but this might help. http://codewalkers.com/tutorials/76/2.html It won't take a cdkey if you make it a chat connection, and I don't think it would be too much of a load on a server, unless you are getting tons(And I mean TONS) of requests..
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

ProXie

Thanks a lot.  If anyone is experienced with this and knows they can do it, contact me:
[email protected].

Or if someone is feeling generous, anyone know specificly how to make the connection?

UserLoser.

Quote from: ProXie on April 24, 2005, 04:04 PM
Thanks a lot.  If anyone is experienced with this and knows they can do it, contact me:
[email protected].

Or if someone is feeling generous, anyone know specificly how to make the connection?

Search these forums.  It has been done numerous times in the past

ProXie

Thanks.  I found a project on planet source code that does what I need.  The problem is, if someone uses the script a few times in a row, the server may be IPBanned.

Maybe you guys can help me.  I'd like to create a script that when a user enters their username, it returns a dynamic signature witht their statistical info.  The problem is, if a bunch of people are using this, everytime a page loads with the signature the socket connection has to open and BNET will eventually IPBan the server.  I was thinking about compiling a list of usernames and connecting once ever 48 hours to get the stat info but if it gets to a high amount of usernames, it may take hours to get all the stat info ( Bnet will recognize it as flooding if the script doesn't pause ).  Not only that, I hear that the socket connection isn't stable and will eventually just drop.

Any ideas?

Blaze

How about making the sever connect through proXies? (Hehe)
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

ProXie

:-D

I'll keep having to supply the script with proxys, they will die :(.

The-FooL

The one long connection is probably your best bet.  Every day or so run through a list of users and obtain their latest stats.  It should take several seconds per user, and the stats can be saved to be dynamically placed into the sig files.

Yegg

I would take a quick look at the source codes to VaporBot. It is written in VB6 but I'm sure you'll figure out what's going on. It provides a great example of connecting to a chat client. Believe it or not, you can (not in languages where you have to declare yur variables) connect to Battle.net as chat in about 8-9 lines at the max. If you aren't going to be receiving data from the server. I'm sure PHP can handle a task like this.

R.a.B.B.i.T

I'm writing this exactly.  I have a simple one that works (kinda) via chat, but the new one I'm making will be able to log on multiple times to speed up the process.

ProXie

Ok.  Well heres the deal, the whole socket idea is pretty much out.  Lets say  I have a DB of 300 people, I can't possibly get updated stats for all of them.  It would also be a load on the server.

I spoke with a friend of mine who will be doing the PHP/MySQL programming and I think I'm going to attempt to make a Starcraft/Warcraft census.  Basicly I will make a standalone client that when you log on with it, it sends your information to the site.  I will also contact big bot programmers and have them try and encorporate the code that sends the users name, wins, loses, and realm to the site. 

The thing is, we can't think of a secure way to do it.  I thought of the idea of sending it through a URL.  The bot can create the URL with variables.  For example: It will connect to http://www.sitename.com?adduser=name_wins_etc.  Then the website will take that and store it into the DB and put it on the site.  The thing is, this can be exploited.  If the bot programmer wants to, he can easily just edit the URL and send fake information through his browser.  Do any of you have an idea on how this could work?

I hope I can get this working.  It would be a nice think for the Battle.net community.  With this info, I can display pages for people with the most wins, ladder wins, etc.  You will be able to view your information on the internet.

R.a.B.B.i.T

There is no 100%, true security on the internet.

That having been said, I recommend using POST calls.

ProXie

I'll keep you guys informed.  I'm working with someone to create a bot that is going to record data.  I don't really want to put too much info out until the site is up and running.  Most probably this project will require the cooperation of bot programmers and hopefully in the future bot programmers will be able to add some sort of code to their bot which supports the project.  For now, there really isn't a great way to do so.