1) { // Decode the registration data $lpos=strpos($argv[1], '('); $chksum=substr($argv[1], 0, $lpos); $tmpdata=rtrim(substr($argv[1], $lpos+1),')'); $tmpchksum=md5($tmpdata); if ($chksum == $tmpchksum) { $reg=unserialize(base64_decode($tmpdata)); //Display the registration Data print "Registration Data\n"; print "-----------------\n\n"; print "Company Name : {$reg['compname']}\n"; print "Location : {$reg['location']}\n"; print "Telephone : {$reg['tel']}\n"; print "MAC : {$reg['mac']}\n\n"; } else { print "Checksum error\n"; } } else { print "You need to provide the registration string for decoding\n"; } // }}} ?>