Get your GMail contacts sync’d with Blackberry

The PHP code so far:

created) {
$gmailer->setLoginInfo($gmail_acc, $gmail_pwd, $my_timezone);

//uncomment if you need it
//$gmailer->setProxy("proxy.company.com");

if ($gmailer->connect()) {
// GMailer connected to Gmail successfully.
// Do something with it.

//Get the contacts
// For "Inbox"

$gmailer->fetchBox(GM_CONTACT, "all", "");

$snapshot = $gmailer->getSnapshot(GM_CONTACT);


//Outputs an array of the contacts
var_dump($snapshot->contacts);

//Outputs the number of contacts
var_dump($snapshot->contacts_total);



} else {
die("Fail to connect because: ".$gmailer->lastActionStatus());
}
} else {
die("Failed to create GMailer because: ".$gmailer->lastActionStatus());
}

?>

Tags:

Comments are closed

Latest Comments

No comments to show.