title: How can I send data with PHP to an IP address via UDP?
body: <p>How can I send data with PHP to an IP address via UDP?</p>
  
  <p>How can I recive that data on the other computer?</p>
  
  <pre><code>&lt;?php
  $fp = pfsockopen( "udp://192.168.1.6", 9601, $errno, $errstr );
  
  if (!$fp)
  {
      echo "ERROR: $errno - $errstr&lt;br /&gt;\n";
  }
  socket_set_timeout ($fp, 10);
  
  $write = fwrite( $fp, "kik" );
  //$data .= fread($fp,9600);
  //echo "$data&lt;br&gt;";
  fclose($fp);
  echo "&lt;br&gt;Connection closed ..&lt;br&gt;";
  
  if (!$write) {
      echo "error writing to port: 9600.&lt;br/&gt;";
      next;
  ?&gt;
  </code></pre>
  
  <p>This code sends the "kik" with a program I can read it on the another computer, but how can I see it in the browser?</p>