1. Go to this page and download the library: Download andrew-svirin/cfonb-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
andrew-svirin / cfonb-php example snippets
$parser = new \Silarhi\Cfonb\CfonbParser();
//Gets all statements day by day
foreach($parser->read120C('My Content') as $statement) {
if ($statement->hasOldBalance()) {
echo sprintf("Old balance : %f\n", $statement->getOldBalance()->getAmount());
}
foreach($statement->getOperations() as $operation) {
//Gets all statement operations
}
if ($statement->hasNewBalance()) {
echo sprintf("New balance : %f\n", $statement->getNewBalance()->getAmount());
}
}
$parser = new \Silarhi\Cfonb\CfonbParser();
//Gets all statements day by day
foreach($parser->read240C('My Content') as $transfer) {
if ($transfer->getHeader()) {
echo sprintf("Header op code : %f\n", $transaction->getHeader()->getOperationCode());
}
foreach($transfer->getTransactions() as $transactions) {
//Gets all statement operations
}
if ($transaction->getTotal()()) {
echo sprintf("Total transfer amount : %f\n", $transaction->getTotal()->getTotalAmount());
}
}
bash
$ composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.