PHP Socket Noob Problem
Posted: Tue Mar 30, 2010 11:17 am
I have an existing python script that uses sockets to communicate with a game server and I am trying to recreate some of the functionality in PHP. I have a series of functions that manually packs a binary string according to the standards set by the games rcon protocol. From then I pass the data to the socket and try to send it and receive a response. However, the response is always empty.
http://pastebin.org/128684
Is this wrong?
My first guess was that the string I pass to socket_send() is supposed to be ASCII, and then it converts it when it sends it which means its trying to re-convert my data to binary... but I couldn't find any solid evidence of that.
Any help would be greatly appreciated
http://pastebin.org/128684
Is this wrong?
My first guess was that the string I pass to socket_send() is supposed to be ASCII, and then it converts it when it sends it which means its trying to re-convert my data to binary... but I couldn't find any solid evidence of that.
Any help would be greatly appreciated