• Welcome to Valhalla Legends Archive.
 

PHP Help with Battle.net

Started by UnderCover, November 16, 2003, 06:51 PM

Previous topic - Next topic

UnderCover

#15
hey thanks but do you know how i can get other lists such as users and stuff??

When I connect to the bnet server can i do normal commands and stuff?

Wut is the type of scripting that gets constant info like instead of reloading the server aall the time how do i get constant access to it and it reports like an irc server into a text box?

UPDATE:

How do you extract the info, I know on the cs server that i have i extracted the ifno through arrays and substr strings but wuts the easiet method of extracting raw info like this?

Arta


UnderCover

lol yeh im trying to extract the records i tihnk i pretty much got it.

On Battle.net wut are those numbers after the person's name
0010 (Chat) do they have any meaning?

Maddox

Quote from: UnderCover on November 17, 2003, 04:08 PM
lol yeh im trying to extract the records i tihnk i pretty much got it.

On Battle.net wut are those numbers after the person's name
0010 (Chat) do they have any meaning?

They are a user's flags.
asdf.

UnderCover

#19
do you know what some of them mean?  Also when I use my php script it shows the users in the channel then when i refresh it changes to show the channel text.  Do you know how i can ge tit to show one or the other?

UPDATED:

is there a way i can extract certain data easily rather than tryign to guess the commands? like  here is an example when i use the info script here is the respone:



1018 INFO "Welcome to Battle.net!"
1018 INFO "This server is hosted by AT&T."
1018 INFO "There are currently 696 users in Chat, and 163994 users playing 60920 games on Battle.net."
1019 ERROR "Chatting with this game is restricted to the channels listed in the channel menu."
1018 INFO "Last logon: Tue Nov 18 1:32 AM"



before that i get users and a channel

Is there a way i can get it to jsut use the line talk everytime talk appears?  or everytime talk appears make it show up a diff color?  I have to do all these other werid commands in order to extract it.

UnderCover

do you think there is a way to change the your ip address with php or use proxies if you get ip banned?

MyndFyre

Quote from: UserLoser. on November 18, 2003, 03:35 PM
Quote from: UnderCover on November 18, 2003, 02:22 PM
do you think there is a way to change the your ip address with php or use proxies if you get ip banned?

I believe you should learn PHP before making a script to connect to Battle.net, or atleast use the link that Arta provided

I wholeheartedly agree.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

UnderCover

#22
Does anyone know a way were i can get this information to be read on one line rather than on seperate lines?

Like is there a code that can count form " to "?  Whenever you use " as a field it screws up because of it thinking thats were it will combine data.

Hope this makes since... :)

Count from point "  to point "?

INFO
"There
are
currently
608
users
in
Chat,
and
164865
users
playing
62231
games
on
Battle.net."

MyndFyre

I've never seen that before.

BTW, can you take a hint?
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Banana fanna fo fanna

explode() is the call you want

(could doubly be used as a joke :))

UnderCover

i have always wanted to know

wuts the diffrence between explode() and split()?

i am using split but it seems to work the same as explode

Banana fanna fo fanna

It does. explode() is just a cooler name.

UnderCover

#27
lol nice

so far i have gotten my script to be able to list users, wut the current channel name is, botname, and battle.net info lines

edit:

does anoyne know how to continue reading from the socket with out reconnecting?

everytime the script reloads it reconnects causing battlen.net to display the same info over and not talk messages.

Kp

Quote from: UnderCover on November 19, 2003, 03:48 PM
does anoyne know how to continue reading from the socket with out reconnecting?
Yes.  Stop closing your socket.  Instead, stay in a loop reading from it, assembling the inbound data into BNCS-Chat records, and parsing them out when you find a delimiter character (newline).  For each record parsed out, pass it to an appropriate handler which understands how to format it for display to the user.  For information on how to implement these steps in a particular language, I recommend consulting a manual on that language, or a guidebook for the language if you are unfamiliar.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

UnderCover

is this the right way for getting data forma  socket or is there a better way?

this way cuts off data :(

I have to have them twice becuase once lets bnet know that i want to login and the next time tells bnet my login stuff.


fputs($server, "\x03$username\r\n$password\r\n");
fgets($server);
$SocStatus = socket_get_status($server);
$info = fread($server, $SocStatus['unread_bytes']);

fputs($server, "\x03$username\r\n$password\r\n");
fgets($server);
$SocStatus = socket_get_status($server);
$data = fread($server, $SocStatus['unread_bytes']);


i only use the $data one the $info is not needed.

|