hi Alain,
This is my code
<?php
set_include_path(".;C:\wamp\www
\ZendGdata-1.11.7\ZendGdata-1.11.7\library");
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Http_Client');
Zend_Loader::loadClass('Zend_Gdata_Query');
Zend_Loader::loadClass('Zend_Gdata_Feed');
Zend_Loader::loadClass('Zend_Http_Response');
// set credentials for ClientLogin authentication
$user = "[email protected]";
$pass = "****";
try {
// perform login and set protocol version to 3.0
$client = Zend_Gdata_ClientLogin::getHttpClient(
$user, $pass, 'cp');
$gdata = new Zend_Gdata($client);
$gdata->setMajorProtocolVersion(3);
// perform query and get result feed
$query = new Zend_Gdata_Query(
'https://www.google.com/m8/feeds/contacts/default/full?max-
results=1000');
$feed = $gdata->getFeed($query);
print_r((string) $feed->id);
$link_photo = "http://www.google.com/m8/feeds/photos/media/
xyz.com";
$http_response = $gdata->get($link_photo);
$rawImage = $http_response->getBody();
$headers = $http_response->getHeaders();
$contentType = $headers["Content-type"];
header("Content-type: ".$contentType);
print_r( $rawImage );
?>
The problem is i m not getting the image and getting the error ->
"ERROR:Expected response code 200, got 400 Invalid request URI"
and i m getting the rel attribute as "http://schemas.google.com/g/
2005#other".
--
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles APIs" 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://code.google.com/apis/contacts/community/forum.html