Hi Gary,

PATH_SEPARATOR is a PHP constant, you don't need to change it:
http://uk3.php.net/set_include_path

Everything else sounds right.

Cheers,
Julian.

On Jan 16, 1:03 pm, My Mobzz <[email protected]> wrote:
> Hi - this is interesting, and I think I might want to try it.  But - I'm new
> at this and want to make sure I understand which portions of this code I'd
> really need to replace or update before giving it a try.
>
> 1. I need to make sure ZEND is installed.
> 2. '/path/to/Zend' in your first sentence from the script - I need to
> translate to whatever my actual path info is for ZEND
> 3.  I need to value PATH_SEPARATOR
> 4.  The first 2 parameters inside the parens for this statement must be
> replaced with real values:
> $client = Zend_Gdata_ClientLogin::getHttpClient ("[email protected]","PASSWORD",
> "cp");
>
> Do I have it right?
>
> Thank you, Julian.
>
> Gary
>
> On 1/16/09, Julian (Google) <[email protected]> wrote:
>
>
>
> > Hi,
>
> > I think the problem is on the Path, it should include /Zend, also, you
> > need to load Zend_Gdata_Gapps:
>
> > <?php
>
> > $clientLibraryPath = '/path/to/Zend';
> > $oldPath = set_include_path(get_include_path() . PATH_SEPARATOR .
> > $clientLibraryPath); // to keep old path.
>
> > require_once 'Loader.php';
>
> > Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
> > Zend_Loader::loadClass('Zend_Gdata_Gapps');
> > Zend_Loader::loadClass('Zend_Gdata_Query');
> > Zend_Loader::loadClass('Zend_Gdata_AuthSub');
>
> > $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/
> > default/full');
>
> > $query->setMaxResults(100);
> > $feed = $gdata->getFeed($query);
>
> > foreach ($feed as $entry) {
> > $XMLContent = $entry->getXML();
> > print_r( $XMLContent );
> > }
>
> > ?>
>
> > Cheers,
> > Julian.
>
> > On Jan 15, 4:44 am, vks <[email protected]> wrote:
> > > Hi,
> > > I have tried this code
>
> > > <?php
> > > set_include_path('/home/jwitt/public_html/grabber');
> > > require_once 'Zend/Loader.php';
> > > Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
> > > Zend_Loader::loadClass('Zend_Gdata_Gapps');
> > > Zend_Loader::loadClass('Zend_Gdata_Query');
>
> > > // Using Client Login
> > > $client = Zend_Gdata_ClientLogin::getHttpClient("[email protected]",
> > > "*******", "cp");
> > > $gdata = new Zend_Gdata($client);
> > > $query = new Zend_Gdata_Query('http://www.google.com/m8/feeds/
> > > contacts/
> > > USER%40domain.com/full');
> > > /*$query = new Zend_Gdata_Query('http://www.google.com/m8/feeds/
> > > contacts/
> > > default/full'); */
> > > $query->setMaxResults(100);
> > > $feed = $gdata->getFeed($query);
>
> > > foreach ($feed as $entry) {
> > >   $XMLContent = $entry->getXML();
> > >   print_r( $XMLContent );
>
> > > }
>
> > > ?>
>
> > > for fetching contacts of the given client but i got the following
> > > errors
>
> > > Fatal error: Uncaught exception 'Zend_Uri_Exception' with message
> > > 'Invalid URI supplied' in /home/jwitt/public_html/grabber/Zend/Uri/
> > > Http.php:156 Stack trace: #0 /home/jwitt/public_html/grabber/Zend/
> > > Uri.php(132): Zend_Uri_Http->__construct('http', '//www.google.co...')
> > > #1 /home/jwitt/public_html/grabber/Zend/Http/Client.php(257):
> > > Zend_Uri::factory('http://www.goog...') #2 /home/jwitt/public_html/
> > > grabber/Zend/Gdata/App.php(618): Zend_Http_Client->setUri('
> >http://www.goog...') #3
> > /home/jwitt/public_html/grabber/Zend/Gdata.php(202):
> > > Zend_Gdata_App->performHttpRequest('GET', 'http://www.goog...', Array,
> > > NULL, NULL, NULL) #4 /home/jwitt/public_html/grabber/Zend/Gdata/App.php
> > > (762): Zend_Gdata->performHttpRequest('GET', 'http://www.goog...',
> > > Array) #5 /home/jwitt/public_html/grabber/Zend/Gdata/App.php(685):
> > > Zend_Gdata_App->get('http://www.goog...', Array) #6 /home/jwitt/
> > > public_html/grabber/Zend/Gdata/App.php(193): Zend_Gdata_App->importUrl
> > > ('http://www.goog...', 'Zend_Gdata_Feed') #7 /home/jwitt/public_html/
> > > grabber/Zend/Gdata.php( in /home/jwitt/public_html/grabber/Zend/Uri/
> > > Http.php on line 156
>
> > > anyone know the reason please help.
>
> > > Thanks,
> > > VKS
--~--~---------~--~----~------------~-------~--~----~
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