Last active
January 2, 2016 13:39
-
-
Save keranm/8311095 to your computer and use it in GitHub Desktop.
Rough example using the getURL to get from MYOB AccountRight Live API in local mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$urlToCall = 'http://localhost:8080/accountright/'.$companyFileID.'/GeneralLedger/GeneralJournal'; | |
// because we are now making a call to a company file we must ALSO include the username and password | |
// I'm using the hardcoded variables in the functions file | |
$generalJournal = getURL( $urlToCall, $companyFileUsername, $companyFilePassword ); | |
// it returns as JSON so lets decode it into a PHP object | |
$generalJournal = json_decode( $generalJournal ); | |
echo '<h1>General Journal - JSON</h1>'; | |
echo '<p>We got the JSON below by calling THIS url '.$urlToCall.'</p>'; | |
echo '<pre>'; // simple html tag to roughly render the HTML | |
var_dump($generalJournal); | |
echo '</pre>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment