Valhalla Legends Archive

Programming => General Programming => Topic started by: Joe[x86] on December 14, 2005, 11:26 PM

Title: PHP: Ways to read from a socket?
Post by: Joe[x86] on December 14, 2005, 11:26 PM
I'm creating a Battle.net binary bot (UJZP), and I'm trying to figure out how to go about receiving data from the socket. I don't want to put the entire thing into an infinite loop (unless I can fork that loop, and continue to do other stuff), but I don't know how to use timers either.

Does anyone know how I'd go about doing this?
Title: Re: PHP: Ways to read from a socket?
Post by: Warrior on December 14, 2005, 11:34 PM
Well the recieve is blocking so just whenever you expect to get data back call the recv function socket_read (iirc) and wait for it to return then parse whatever data is returned in the function.