".$pos." --> ".$inv."\n"; $keep .= substr($hexstr,$inv,1); } // And give some output. echo "0x".$keep." [Converted to IR Library format]\n"; echo "0x".$hex." [From your input (from LIRC)]\n"; echo "\n"; // Some testing hex values from my MCE remote. // x37FF07bff /* Blue 0x00007ba1 Yellow 0x00007ba2 Green 0x00007ba3 Red 0x00007ba4 */ // $code = 0x37FF07bff; // key ZERO // $code = 0x37FF07bed; // $code = 0x37FF06BFF; // Key 0 // $code = 0x37FF08BF3; // Xbox On/Off ?>