Hi,

how to retrieve contact photo using php? I have a page that get photo
url, so I need to build a getPhoto.php page so I can use like:

<img src='getPhoto.php?google_image_uri=http://www.google.com/m8/feeds/
photos/media/--user%40---domain/2333ea428ff7f466/
wRnjjcrVfdxGN97oVdzX1qg'>


This is my code:
<?php

/* file getPhoto.php */

session_start();

$header = array("Authorization: GoogleLogin auth=".$_SESSION
['sessionToken']);
$opts = array( 'http' => array ('method'=>'GET',
                                           'header'=>$header));
$ctx = stream_context_create($opts);
$raw=file_get_contents($_REQUEST['google_image_uri'],false,$ctx);
echo ($raw);

?>

Any ideas?

Thanks in advance
v.

--~--~---------~--~----~------------~-------~--~----~
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