Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: LeBuzna on May 23, 2004, 08:14 AM

Title: PHP and stats
Post by: LeBuzna on May 23, 2004, 08:14 AM
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
Title: Re:PHP and stats
Post by: Forged on May 23, 2004, 11:33 AM
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.
Title: Re:PHP and stats
Post by: BinaryzL on May 23, 2004, 02:47 PM
Quote from: Forged on May 23, 2004, 11:33 AM
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.

It's not hard to connect to battle.net with php.
Title: Re:PHP and stats
Post by: Forged on May 23, 2004, 03:17 PM
Maybe, but I still don't know how...
Title: Re:PHP and stats
Post by: Tuberload on May 23, 2004, 03:42 PM
Quote from: Forged on May 23, 2004, 03:17 PM
Maybe, but I still don't know how...

Start browsing through PHP documentation until you find some functions that look like they can accomplish your task.
Title: Re:PHP and stats
Post by: Forged on May 23, 2004, 03:43 PM
Why? I am not the one trying to make it connect...
I have no use for something like that...
Title: Re:PHP and stats
Post by: tA-Kane on May 23, 2004, 10:16 PM
Quote from: LeBuzna on May 23, 2004, 08:14 AM
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
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.

http://forum.valhallalegends.com/phpbbs/index.php?board=17;action=viewprofile;user=LockesRabb

Edit: get it from him, not it  ;)
Title: Re:PHP and stats
Post by: Don Cullen on May 25, 2004, 09:49 PM
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