PHP code example of mfajfr / tarsago-export

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

    

mfajfr / tarsago-export example snippets


$row = new \TarsagoExport\Models\Telemarketing\Row($param1, $param2, ...); // implements IRow 

$transaction = new \TarsagoExport\Models\Telemarketing\Transaction(); // implements ITransaction
$transaction->addRow($row); // Adding rows

$exporter = new \TarsagoExport\Exporters\SFTPExporter($ip, new \TarsagoExport\Credentials\UserPasswordCredentials($username, $password));
$exporter->upload('/path/to/file.csv', $transaction);