The Portfolio API documentation comes with several code samples that illustrate the different methods available through the API. But sometimes seeing these samples out of context isn’t enough. You need to see the whole application that they came from.
Attached to this message is a zip file containing the PHP code that was used to create the code samples. These are not complicated scripts. They were written to demonstrate specific methods, but they are functional.
Instructions for using the PHP Code Samples.
[ul]1. Download and unzip the attached file.
2. Open Terminal on Macintosh or the Command Line utility in Windows.
3. Navigate to the folder containing the PHP source files.
4. Run one of the files using the following command. (For example: loginLogout.php)
You will need to make some modifications to the scripts to get them to work on your system. Open the files in a text editor and change the ‘$SERVER_ADDRESS’ variable so that it is pointing to your Portfolio Server. The ‘$catUsed’ variable references a specific catalog the script interacts with. Change this to one of your own catalogs, or create one called simple.fdb.
Please post any questions you might have to the forums and we’ll answer them as best we can.
For the very latest updates to the API documentation and new code samples, you can view the online API code reference at doc.extensis.com/api/portfolio/index.html.
PHP Code Samples.zip (178 KB)