Hi,
it's stored in contact_data_1, but if you want to obtain your contacts in PHP, then I think you should use EPESI to get contacts.
You've got three options:
(using EPESI)
1. create custom php file and load EPESI modules and obtain contacts with RecordBrowser methods.
2. create simple EPESI module and use callback href to obtain contacts and call sync methods.
(without EPESI)
3. connect to the database directly and obtain data from contact_data_1 or company_data_1
In the first approach make sure that you're logged in as a specific user, because contacts shown depends on user access permissions.
Using database directly you'll get all contacts - also those deleted (check 'active' column).
I suggest you to use the second approach and write a simple module with a button to sync contacts.
// load EPESI
define('CID', false);
define('READ_ONLY_SESSION',1);
require_once('../../../include.php'); // link to the main directory of epesi
ModuleManager::load_modules();
// end load EPESI
$x = new RBO_RecordsetAccessor('contact'); // or 'company' for companies, but then use different columns below
// get_records( criteria, columns )
$records = $x->get_records(array(), array('first_name', 'last_name', 'email'));
foreach ($records as $r) {
echo $r->first_name; // object like access
echo $r['last_name']; // array like access
}
Regards,
Adam