Hi Ian,

Here is a sample:

<?php
$clientLibraryPath = '/var/www/contacts/Zend';
$oldPath = set_include_path(get_include_path() . PATH_SEPARATOR .
$clientLibraryPath);

require_once 'Loader.php';

Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_Query');

// Using Client Login
$client = Zend_Gdata_ClientLogin::getHttpClient("[email protected]",
"Password", "cp");
$gdata = new Zend_Gdata($client);
$query = new Zend_Gdata_Query('http://www.google.com/m8/feeds/contacts/
user%40domain.com/full');
$query->setMaxResults(1000);
$feed = $gdata->getFeed($query,Zend_Gdata_App_Feed);

foreach ($feed->getEntry() as $entry ) {
  echo 'title: '. $entry->getTitle()->getText() . ' ';
  echo 'id: '. $entry->getId()->getText() . '<br>';
  $entry->setTitle($entry->getTitle()->setText("new title text"));
  $entry->save();//$entry->id,null,null);
}
?>

You can find more information about the Entry object here:
http://framework.zend.com/apidoc/core/Zend_Gdata/App/Zend_Gdata_App_Entry.html

Cheers,
Julian

On Feb 23, 5:04 pm, ichilton <[email protected]> wrote:
> Hi,
>
> I am looking for some PHP code to get a list of contacts from Gmail,
> loop through them and update each one (I want to append the middle
> name to the first name and clear the middle name.
>
> Does anyone have an example of something similar I can use as a basis?
>
> Thanks
>
> Ian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Contacts API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-contacts-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to