I'm quite new to sockets, I'm using fsockopen to communicate with a server. What i want to do is communicate with a server get a response back then communicate again and get another response back. The first exchange goes fine but the second doesnt seem to work? Code: //$fp is a valid socket, using fsockopen fwrite($fp, $socks_header); print fread($fp, 2048); fwrite ($fp, $header); print fread($fp, 2048); PHP: Thanks
The problem is that i need both communications to be in the same connection. I think the problem may be that it doesnt think that the first communication has finished?