Beispiel #1
0
$jak->addData(11, "15");
$jak->addData(12, date('His'));
$jak->addData(13, date('md'));
$jak->addData(22, "51");
$jak->addData(23, "000");
$jak->addData(24, "000");
$jak->addData(25, "00");
$jak->addData(35, "4594140000091494D19122010000015400000");
$jak->addData(41, "173664");
$jak->addData(42, "39457728837");
$jak->addData(52, "FAA57088694EF194");
//$jak->addData(55, "5F2A0201245F34010182021C008407A0000000031010950580000000009A031102249B0268009C01009F02060000000000009F03060000000000009F0607A00000000310109F0802008C9F0902008C9F100706010A039000009F1A0201249F2608423158936ED6C38F9F2701809F3303E0B0C89F34034103029F3501229F360200019F3704ACAC66E89F5800DF0100DF0200DF0400");
$jak->addData(55, "9F02060000000001009F03060000000000009F1A020214950580800400005F2A0202149A031606099C01019F3704EEDA181E82021C009F360200179F34030204009F26083B798129256AF6F79F2701809F100706010A03A0A0009F3303E040009F3501119F090200008C159F02069F03069F1A0295055F2A029A039C019F37048D178A029F02069F03069F1A0295055F2A029A039C019F37048E140000000000000000020102041E051E031F020000");
//$jak->addData(55, "9F0206000000000100");
echo 'ISO: ' . $iso . "\n";
echo 'MTI: ' . $jak->getMTI() . "\n";
echo 'Bitmap: ' . $jak->getBitmap() . "\n";
echo 'Data Element: ';
print_r($jak->getData());
echo "\n\n\n";
$data = $jak->getData();
$isoprint .= pack('H*', $jak->getMTI());
$isoprint .= pack('H*', $jak->getBitmap());
$isoprint .= pack('H*', $data[3]);
$isoprint .= pack('H*', $data[4]);
$isoprint .= pack('H*', $data[11]);
$isoprint .= pack('H*', $data[12]);
$isoprint .= pack('H*', $data[13]);
$isoprint .= pack('H*', $data[22]);
$isoprint .= pack('H*', $data[23]);
$isoprint .= pack('H*', $data[24]);
Beispiel #2
0
        default:
            break;
    }
}
//Main -------------------------------------------------------------------------
do {
    $isoSRV->openStream();
    $isoMsg->addISO($isoSRV->inputStream());
    if ($isoMsg->validateISO()) {
        echo "<<<<<<<<<< Incoming.................................................\n";
        echo $isoMsg->getISO() . "\n";
        echo "+++++++++++++++++++++++++++ Parsed ISO +++++++++++++++++++++++++++++++\n";
        var_dump($isoMsg->getData());
        echo "\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n";
        echo "Start processing message: " . date("ymdHis") . "\n";
        $isoProc = getResponse($isoMsg->getMTI(), $isoMsg->getData());
        $isoRsp->addMTI($isoProc["mti"]);
        $isoRsp->addISO($isoProc["iso"]);
        $isoSRV->outputStream($isoRsp->getISO());
        echo "Finish processing message: " . date("ymdHis") . "\n";
        echo ">>>>>>>>>>> Outgoing................................................\n";
        echo $isoRsp->getISO() . "\n";
        echo "++++++++++++++++++++++++++++ Parsed ISO ++++++++++++++++++++++++++++++\n";
        var_dump($isoRsp->getData());
        echo "\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n";
        echo "\n\n\n";
    } else {
        echo "ERROR!!!! - Invalid ISO Message.\n\n\n\n";
    }
} while (true);
$isoMsg->addMTI('0200');