Link a Google Base item to your website


Here is how you can set the alternate link using the PHP client library. When someone clicks on your item in Google Base, he/she will be redirected to your site.
<?
$link = new Zend_Gdata_App_Extension_Link(); 
$link->setHref('http://www.example.com'); 
$link->setRel('alternate'); 
$link->setType('text/html');  
$linkArray[] = $link; 

$entry->setLink($linkArray); 
?>
Here is the underlying XML:
<link rel='alternate' type='text/html' href='http://www.example.com'/>

No comments: