Hello all masters and freaks,
New here, sorry if I repeat the problem but I didn`t found a solution for it.
I`m trying to send a string throught a socket (IP address) in one page/pc and receive the string throught a socket (IP address), I could find many examples but none of them works. I`m working on it for awhile now.
My code for sending is:
$fp = fsockopen($host, $port, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
fwrite($fp, $out);}
and receiving:
$fp = fsockopen($host, $port, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
fread($fp, $out);}
Please help, anyone.