I'm making an IRC-client in PHP for Windows. I've got it to work other than scanning input.
This is the code I've got so far, it reads input from the console and then from the IRC-server. But that's what I need help with.
while(true){
$func -> getInput("<$nick>: ");
$func -> read($irc);
}
GetInput() is just fread(STDIN). Read() is fread(). $irc is fsockopen to the IRC-server.
I've been looking for a solution that wouldn't halt the whole program until enter is pressed and found someone with the same problem, unfortunally I didn't understand the answers.
This is that question: PHP CLI - get user input while still doing things in background