title: PHP IRC bot connect?
body: <p>I need a little help with an IRC bot I'm creating (very simple).</p>
  
  <pre><code>&lt;?php
  
  $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
  $yonk = socket_connect($sock, "127.0.0.1", 6667);
  
  $wut = socket_read($sock, 1024);
  socket_write($sock, "NICK FikesPHPThingy\r\n");
  socket_write($sock, "USER fikeh fikeh fikeh :Fike's PHP thang.\r\n");
  socket_write($sock, "JOIN #LightSpike\r\n");
  
  echo $wut;
  
  while (True) {
  
  }
  ?&gt;
  </code></pre>
  
  <p>It connects and reads</p>
  
  <pre><code>:de.blank.net NOTICE Auth :*** Looking up your hostname...
  :de.blank.net NOTICE 00AAAAAZ4 :*** Skipping host resolution (disabled by server administrator)
  </code></pre>
  
  <p>But it doesn't do anything after that. I'm creating this without any tutorials, just by myself. But I can't seem to get it working. Any ideas?</p>
  
  <p>PS: Sorry for the odd variable names.</p>