PHP sample contacts app

AccountRight Live API

Bringing together PHP and the AccountRight Live API, this app will allow you to get up to speed quickly with the Contacts of AccountRight

Use the buttons on the left to grab a copy (or fork it on GitHub) and install it on your PHP environment.

Requirements

This sample makes use of cURL within PHP. In theory any install of PHP4.5 and above should work fine. You will also need to ensure modrewrite is setup and running in Apache. We recommend using MAMP or WAMP as quick solutions for getting PHP installed on your local computer.

The .htaccess file looks like this

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^signin/(.*)/$ ./index.php?page=signin&guid=$1 [L,QSA]

RewriteRule ^customers/$ ./index.php?page=contacts&type=customer [L,QSA]
RewriteRule ^suppliers/$ ./index.php?page=contacts&type=supplier [L,QSA]
RewriteRule ^employees/$ ./index.php?page=contacts&type=employee [L,QSA]

RewriteRule ^contact/(.*)/(.*)/$ ./index.php?page=contact&type=$1&id=$2 [L,QSA]
RewriteRule ^edit/(.*)/(.*)/$ ./index.php?page=edit&type=$1&id=$2 [L,QSA]
RewriteRule ^add/$ ./index.php?page=add [L,QSA]

Support or Contact

There is limited support available with this sample, the code is fully documented so you should be able to get up and running. However you can always contact us through our Community Forums or Twitter account and see if we can help.