Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.