Valhalla Legends Forums Archive | Battle.net Bot Development | PHP and stats

AuthorMessageTime
LeBuzna
Hi, im not advanced programmer and I'd like to make my pages look better. I need just a simple PHP script, that will get info about players, if they are on/offline, stats etc. I've tried to search this forum, but could'n find anything usefull. Please help me, I'd especially apreciate any code snipet. thanks
May 23, 2004, 1:14 PM
Forged
for war3 a php script isn't neccisary, just frame the stats from blizzads ladder site, and I am not really sure how to connect to bnet through php so I can't really help you with the other clients.
May 23, 2004, 4:33 PM
BinaryzL
[quote author=Forged link=board=17;threadid=6924;start=0#msg61353 date=1085329995]
for war3 a php script isn't neccisary, just frame the stats from blizzads ladder site, and I am not really sure how to connect to bnet through php so I can't really help you with the other clients.
[/quote]

It's not hard to connect to battle.net with php.
May 23, 2004, 7:47 PM
Forged
Maybe, but I still don't know how...
May 23, 2004, 8:17 PM
Tuberload
[quote author=Forged link=board=17;threadid=6924;start=0#msg61401 date=1085343438]
Maybe, but I still don't know how...
[/quote]

Start browsing through PHP documentation until you find some functions that look like they can accomplish your task.
May 23, 2004, 8:42 PM
Forged
Why? I am not the one trying to make it connect...
I have no use for something like that...
May 23, 2004, 8:43 PM
tA-Kane
[quote author=LeBuzna link=board=17;threadid=6924;start=0#msg61337 date=1085318062]
Hi, im not advanced programmer and I'd like to make my pages look better. I need just a simple PHP script, that will get info about players, if they are on/offline, stats etc. I've tried to search this forum, but could'n find anything usefull. Please help me, I'd especially apreciate any code snipet. thanks
[/quote]
This guy, LockesRabb, has already completed a PHP script that connects to Battle.net and gets the stats. It would not be hard to modify his script (if you can get it from him) to use /whois or /friends list, instead, and display the online/offline status instead.

https://davnit.net/bnet/vL/phpbbs/index.php?board=17;action=viewprofile;user=LockesRabb

Edit: get it from him, not it ;)
May 24, 2004, 3:16 AM
LockesRabb
look up socket on google using keywords: php socket

its pretty much easy, just like using a winsocket in vb, except it's more one-lined.

if you like, i can give the code that opens the socket, and closes it. for getting and sending data, i suggest looking up the socket function @ php.net- i know it's in their docs. :-) while I could make life easier by givin u the entire completed function i use to connect to bnet n get stats, that'd defeat the purpose of learning. So, learn baby, learn! :-)

EDIT: Kane- thanks for that unexpected referral. :-P
May 26, 2004, 2:49 AM

Search