Hello,
just wondering if this is possible.
I have a script that connects to a certain port.. using fsockopen.
i.e:
$Socket = @fsockopen($ServerHost,$ServerPort,$Err,$ErrStr);
while (!feof($Socket)) {
$Get = fgets($Socket,256);
if (!empty($Get)) {
...
}
}
Now just wondering if, in the same script, I could have another socket open, but waiting, listening for another connection to the script itself.
The thing is, i need it to do something if and when something connects to that listening port, as well as staying connected and using the socket above?