<html>
<head></head>
<body>

<?
if ($_POST['r']){
$command = ''.$_POST['r'].' '.$_POST['g'].' '.$_POST['b'];
$address = "udp://depape-laptop.caset.buffalo.edu";
$port = "4550";
echo $command.'<br>';

	 //$fp = fsockopen("udp://127.0.0.1", 13, $errno, $errstr);
    $fp = fsockopen($address, $port, $errno, $errstr);

	if (!$fp) {
			echo "ERROR: $errno - $errstr<br>\n";
		} else {
		
			$sent = fwrite($fp, $command);
			if ($sent){
			echo "sent";
			//echo fread($fp, 26);
			fclose($fp);
			}
	}
}

?>
<h1>Color input form</h1>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="400" height="150">
  <param name="movie" value="color_sliderYG.swf">
  <param name="quality" value="high">
  <embed src="color_sliderYG.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="400" height="150"></embed>
</object>
<hr>





</body></head></html>
