I need to connect a client socket in a PHP script to a server socket created by a C++ program on another machine (specifically, MS Visual C++ under Windows XP-64). I've been trying trying to do it for like forever now, and without much success
The PHP client socket uses fsockopen():
Code: Select all
$host="tcp://x.x.x.x";
$port = 1027;
// open a client connection
$fp = fsockopen ($host, $port, $errno, $errstr, 3);
...do some send and receive...
fclose($fp);The C++ server socket uses Microsoft's CAsyncSocket class or WinSock2. A client socket written with these same classes connects to this server without a hitch.
Please help, and be kind - I'm new to socket programming.
P.