$gp->registerPackage('Zend_Gdata_Geo');
$gp->registerPackage('Zend_Gdata_Geo_Extension');
$where = $gp->newGeoRssWhere();
$position = $gp->newGmlPos('37.0 -122.0');
$where->point = $gp->newGmlPoint($position);
$photoEntry->setGeoRssWhere($where);
Showing posts with label pwa. Show all posts
Showing posts with label pwa. Show all posts
Geo-Tagging a Picasa Photo in PHP
Posted by
Jeff Fisher
on
Tuesday, December 09, 2008
Assuming that $gp is a Zend_Gdata_Photos object, this will tag the $photoEntry with the specified latitude and longitude. (Note you still have to insert or update the $photoEntry.)
Create a public album for Picasa Web Albums
Posted by
Jeff Fisher
on
Monday, August 18, 2008
This is how to do it in .NET:
AlbumEntry newEntry = new AlbumEntry(); newEntry.Title.Text = "My New album"; newEntry.Summary.Text = "This is an album"; AlbumAccessor ac = new AlbumAccessor(newEntry); ac.Access = "public";This is how to do it in PHP:
$entry = new Zend_Gdata_Photos_AlbumEntry();
$entry->setTitle($gp->newTitle('title'));
$entry->setGphotoAccess($gp->newAccess("public"));
$createdEntry = $gp->insertAlbumEntry($entry);
SimpleXML and accessing MediaRSS / other namespaces
Posted by
Jeff Fisher
on
Friday, July 11, 2008
print_r($xml->getDocNamespaces());
foreach ($xml->entry as $entry)
{
//All the media namespaced items under an entry
$media = $entry->children("http://search.yahoo.com/mrss/%27%29;"');
echo "Title: " . $media->group->title;
echo "Keywords: " . $media->group->keywords;
//There are multiple thumbnail fields, so loop through and print out
all the attributes
foreach($media->group->thumbnail as $thumb)
{
foreach ($thumb->attributes() as $a => $b)
{
print $a . " " . $b . "\n";
}
}
}
Subscribe to:
Posts (Atom)