• Welcome to Valhalla Legends Archive.
 

PHP and stats

Started by LeBuzna, May 23, 2004, 08:14 AM

Previous topic - Next topic

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

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.
QuoteI wish my grass was Goth so it would cut itself

BinaryzL

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.

Forged

Maybe, but I still don't know how...
QuoteI wish my grass was Goth so it would cut itself

Tuberload

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.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Forged

Why? I am not the one trying to make it connect...
I have no use for something like that...
QuoteI wish my grass was Goth so it would cut itself

tA-Kane

#6
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  ;)
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Don Cullen

#7
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
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.