<?php //Error reporting ini_set('display_errors', 1); error_reporting(E_ALL); //load paAPI require_once '/var/www/html/magento/paGateway/reportAPI/invoiceReport.php'; //load Mage require_once "/var/www/html/magento/app/Mage.php"; Mage::app(); $config_info = parse_ini_file('/var/www/html/magento/paGateway/paGateway.ini', true); $uid = $config_info['login']['uid']; $pass = $config_info['login']['pass']; $nw = new invoiceReport(); $nw->setUser($uid, $pass); $nw->setAction('getInvoiceInRange'); //only supported function $nw->setStartDate('20120101'); //start date $nw->setEndDate('20120515'); //end date $obj = $nw->sendRequest(); // print_r($nw->sendRequest()); //send request and get response in json format $response = json_decode($obj, true); // var_dump($response); echo "<html><head></head><body style='font-family: Arial, sans-serif; font-size: 12px;'>"; echo "<table cellpadding=5 cellspacing=0 border=1>"; echo "<tr style='font-weight:bold; background-color:1D4E51; color:#f1f1f1;'>"; echo "<td>xqty</td>"; echo "<td>xprice</td>"; echo "<td>xmpline</td>";