• Welcome to Valhalla Legends Archive.
 
Main Menu

pack()

Started by Augural Sentinel, February 20, 2006, 10:18 AM

Previous topic - Next topic

Augural Sentinel

I don't like using other people's code, especially when I don't understand exactly how something works.  So, after looking through Joe's PHP script for connecting to Battle.net, I started looking through the PHP manual.

So my question is this.  Does PHP's pack() create the correct type of Endians that is needed to log onto Battle.net when you use 'v' and 'V'?

$a = pack('V', 0x00);
$b = pack('v', 0x00);

And would the above be the correct usage?  Or do I need to use a different format character instead of 'V'?

rabbit

If you read the descriptions of format on php.net, it tells you.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Augural Sentinel

#2
Eh, it still doesn't help a whole lot.  Do I need short or long variable types?

rabbit

Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Augural Sentinel

I completely forgot to check the B.net docs.  You're right.  I'm just retarded.