Author | Message | Time |
---|---|---|
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 | April 24, 2005, 8:14 PM |
KkBlazekK | Yes, you could create a socket and connect to the server of choice, select a chat connection, and then send the stats request. | April 24, 2005, 8:49 PM |
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. | April 24, 2005, 8:57 PM |
KkBlazekK | 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.. | April 24, 2005, 9:00 PM |
ProXie | Thanks a lot. If anyone is experienced with this and knows they can do it, contact me: ReachMax@gmail.com. Or if someone is feeling generous, anyone know specificly how to make the connection? | April 24, 2005, 9:04 PM |
UserLoser. | [quote author=ProXie link=topic=11380.msg109751#msg109751 date=1114376651] Thanks a lot. If anyone is experienced with this and knows they can do it, contact me: ReachMax@gmail.com. Or if someone is feeling generous, anyone know specificly how to make the connection? [/quote] Search these forums. It has been done numerous times in the past | April 24, 2005, 9:28 PM |
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? | April 24, 2005, 9:47 PM |
KkBlazekK | How about making the sever connect through proXies? (Hehe) | April 24, 2005, 9:49 PM |
ProXie | :-D I'll keep having to supply the script with proxys, they will die :(. | April 24, 2005, 9:51 PM |
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. | April 25, 2005, 12:08 AM |
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. | April 25, 2005, 12:09 AM |
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. | April 25, 2005, 1:25 AM |
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. | April 25, 2005, 2:01 PM |
R.a.B.B.i.T | There is no 100%, true security on the internet. That having been said, I recommend using POST calls. | April 25, 2005, 11:13 PM |
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. | April 26, 2005, 2:19 AM |
Adron | Looking at this, I don't see why you couldn't have done it all in php. All you'd need is a database behind it to track when you last connected to b.net (prevent connecting too often) and to cache the data for users and decide when you need to refresh your information. | April 26, 2005, 10:37 AM |
Myndfyr | [quote author=Adron link=topic=11380.msg109963#msg109963 date=1114511860] Looking at this, I don't see why you couldn't have done it all in php. All you'd need is a database behind it to track when you last connected to b.net (prevent connecting too often) and to cache the data for users and decide when you need to refresh your information. [/quote] I agree. Even with a list of 300, that shouldn't be an issue. Suppose you made one connection and requested a profile every five seconds from that connection. You're not going to flood from Battle.net; you can pull up 20 profiles per minute. In total, you could get all 300 profiles inside of 15 minutes. | April 26, 2005, 3:19 PM |
ProXie | Originally, that would have been a good plan. I'm hoping to rack up a database of thousands of users. The project idea has pretty much evolved. | April 26, 2005, 7:09 PM |
R.a.B.B.i.T | [quote author=MyndFyre link=topic=11380.msg109987#msg109987 date=1114528786] [quote author=Adron link=topic=11380.msg109963#msg109963 date=1114511860] Looking at this, I don't see why you couldn't have done it all in php. All you'd need is a database behind it to track when you last connected to b.net (prevent connecting too often) and to cache the data for users and decide when you need to refresh your information. [/quote] I agree. Even with a list of 300, that shouldn't be an issue. Suppose you made one connection and requested a profile every five seconds from that connection. You're not going to flood from Battle.net; you can pull up 20 profiles per minute. In total, you could get all 300 profiles inside of 15 minutes. [/quote]Sockets in PHP are a bit slower than in other languages. Even sending 0x51 and 0x50 takes a few seconds each. I'd say it would take ~45 minutes, after all, you do recieve a lot of data you need to parse. | April 26, 2005, 10:46 PM |
Myndfyr | [quote author=ProXie link=topic=11380.msg110028#msg110028 date=1114542587] Originally, that would have been a good plan. I'm hoping to rack up a database of thousands of users. The project idea has pretty much evolved. [/quote] Then, rather than using PHP to handle the connections, write a simple client in C/VB/etc. and run it as a service. Continually sending requests, you won't time out. Go slowly enough,and you won't be flood banned. Connect both parts to the same database; it shouldn't be particularly difficult. | April 26, 2005, 11:25 PM |
ProXie | [quote author=MyndFyre link=topic=11380.msg110070#msg110070 date=1114557952] [quote author=ProXie link=topic=11380.msg110028#msg110028 date=1114542587] Originally, that would have been a good plan. I'm hoping to rack up a database of thousands of users. The project idea has pretty much evolved. [/quote] Then, rather than using PHP to handle the connections, write a simple client in C/VB/etc. and run it as a service. Continually sending requests, you won't time out. Go slowly enough,and you won't be flood banned. Connect both parts to the same database; it shouldn't be particularly difficult. [/quote] Thats 'almost' what I'm planning. I'm working with someone to program a C bot that will run and 'crawl' certain channels to collect data. | April 27, 2005, 2:55 AM |
Myndfyr | [quote author=ProXie link=topic=11380.msg110096#msg110096 date=1114570530] [quote author=MyndFyre link=topic=11380.msg110070#msg110070 date=1114557952] [quote author=ProXie link=topic=11380.msg110028#msg110028 date=1114542587] Originally, that would have been a good plan. I'm hoping to rack up a database of thousands of users. The project idea has pretty much evolved. [/quote] Then, rather than using PHP to handle the connections, write a simple client in C/VB/etc. and run it as a service. Continually sending requests, you won't time out. Go slowly enough,and you won't be flood banned. Connect both parts to the same database; it shouldn't be particularly difficult. [/quote] Thats 'almost' what I'm planning. I'm working with someone to program a C bot that will run and 'crawl' certain channels to collect data. [/quote] Might want to search on that too. A channel crawler was already talked about before; the information they found might be useful. :) | April 27, 2005, 4:00 AM |