PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Available Technorati Queries

Zend_Service_Technorati provides support for the following queries:

Technorati Cosmos

Cosmos query lets you see what blogs are linking to a given URL. It returns a Zend_Service_Technorati_CosmosResultSet object. For full details please see Zend_Service_Technorati::cosmos() in the API reference guide.

Example 853. Cosmos Query

<?php
$technorati 
= new Zend_Service_Technorati('VALID_API_KEY');
$resultSet $technorati->cosmos('http://devzone.zend.com/');

echo 
"<p>Reading " $resultSet->totalResults() .
     
" of " $resultSet->totalResultsAvailable() .
     
" available results</p>";
echo 
"<ol>";
foreach (
$resultSet as $result) {
    echo 
"<li>" $result->getWeblog()->getName() . "</li>";
}
echo 
"</ol>";

Technorati Search

The Search query lets you see what blogs contain a given search string. It returns a Zend_Service_Technorati_SearchResultSet object. For full details please see Zend_Service_Technorati::search() in the API reference guide.

Example 854. Search Query

<?php
$technorati 
= new Zend_Service_Technorati('VALID_API_KEY');
$resultSet $technorati->search('zend framework');

echo 
"<p>Reading " $resultSet->totalResults() .
     
" of " $resultSet->totalResultsAvailable() .
     
" available results</p>";
echo 
"<ol>";
foreach (
$resultSet as $result) {
    echo 
"<li>" $result->getWeblog()->getName() . "</li>";
}
echo 
"</ol>";

Technorati Tag

The Tag query lets you see what posts are associated with a given tag. It returns a Zend_Service_Technorati_TagResultSet object. For full details please see Zend_Service_Technorati::tag() in the API reference guide.

Example 855. Tag Query

<?php
$technorati 
= new Zend_Service_Technorati('VALID_API_KEY');
$resultSet $technorati->tag('php');

echo 
"<p>Reading " $resultSet->totalResults() .
     
" of " $resultSet->totalResultsAvailable() .
     
" available results</p>";
echo 
"<ol>";
foreach (
$resultSet as $result) {
    echo 
"<li>" $result->getWeblog()->getName() . "</li>";
}
echo 
"</ol>";

Technorati DailyCounts

The DailyCounts query provides daily counts of posts containing the queried keyword. It returns a Zend_Service_Technorati_DailyCountsResultSet object. For full details please see Zend_Service_Technorati::dailyCounts() in the API reference guide.

Example 856. DailyCounts Query

<?php
$technorati 
= new Zend_Service_Technorati('VALID_API_KEY');
$resultSet $technorati->dailyCounts('php');

foreach (
$resultSet as $result) {
    echo 
"<li>" $result->getDate() .
         
"(" $result->getCount() . ")</li>";
}
echo 
"</ol>";

Technorati TopTags

The TopTags query provides information on top tags indexed by Technorati. It returns a Zend_Service_Technorati_TagsResultSet object. For full details please see Zend_Service_Technorati::topTags() in the API reference guide.

Example 857. TopTags Query

<?php
$technorati 
= new Zend_Service_Technorati('VALID_API_KEY');
$resultSet $technorati->topTags();

echo 
"<p>Reading " $resultSet->totalResults() .
     
" of " $resultSet->totalResultsAvailable() .
     
" available results</p>";
echo 
"<ol>";
foreach (
$resultSet as $result) {
    echo 
"<li>" $result->getTag() . "</li>";
}
echo 
"</ol>";

Technorati BlogInfo

The BlogInfo query provides information on what blog, if any, is associated with a given URL. It returns a Zend_Service_Technorati_BlogInfoResult object. For full details please see Zend_Service_Technorati::blogInfo() in the API reference guide.

Example 858. BlogInfo Query

<?php
$technorati 
= new Zend_Service_Technorati('VALID_API_KEY');
$result $technorati->blogInfo('http://devzone.zend.com/');

echo 
'<h2><a href="' . (string) $result->getWeblog()->getUrl() . '">' .
     
$result->getWeblog()->getName() . '</a></h2>';

Technorati BlogPostTags

The BlogPostTags query provides information on the top tags used by a specific blog. It returns a Zend_Service_Technorati_TagsResultSet object. For full details please see Zend_Service_Technorati::blogPostTags() in the API reference guide.

Example 859. BlogPostTags Query

<?php
$technorati 
= new Zend_Service_Technorati('VALID_API_KEY');
$resultSet $technorati->blogPostTags('http://devzone.zend.com/');

echo 
"<p>Reading " $resultSet->totalResults() .
     
" of " $resultSet->totalResultsAvailable() .
     
" available results</p>";
echo 
"<ol>";
foreach (
$resultSet as $result) {
    echo 
"<li>" $result->getTag() . "</li>";
}
echo 
"</ol>";

Technorati GetInfo

The GetInfo query tells you things that Technorati knows about a member. It returns a Zend_Service_Technorati_GetInfoResult object. For full details please see Zend_Service_Technorati::getInfo() in the API reference guide.

Example 860. GetInfo Query

<?php
$technorati 
= new Zend_Service_Technorati('VALID_API_KEY');
$result $technorati->getInfo('weppos');

$author $result->getAuthor();
echo 
"<h2>Blogs authored by " $author->getFirstName() . " " .
     
$author->getLastName() . "</h2>";
echo 
"<ol>";
foreach (
$result->getWeblogs() as $weblog) {
    echo 
"<li>" $weblog->getName() . "</li>";
}
echo 
"</ol>";

Technorati KeyInfo

The KeyInfo query provides information on daily usage of an API key. It returns a Zend_Service_Technorati_KeyInfoResult object. For full details please see Zend_Service_Technorati::keyInfo() in the API reference guide.

Zend Framework