PHP code example of diegoricardo / ofxparser

1. Go to this page and download the library: Download diegoricardo/ofxparser 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/ */

    

diegoricardo / ofxparser example snippets


$OfxParser = new \OfxParser\Parser;
$Ofx = $OfxParser->loadFromFile('/path/to/your/bankstatement.ofx');

// Get the statement start and end dates
$startDate = $Ofx->BankAccount->Statement->startDate;
$endDate = $Ofx->BankAccount->Statement->endDate;

// Get the statements for the current bank account
$transactions = $Ofx->BankAccount->Statement->transactions;
bash
$ php composer.phar update asgrim/ofxparser