Exemplo n.º 1
0
"><?php 
            echo $entry->get('title');
            ?>
</a></div>
		<?php 
        }
        ?>
	<?php 
    }
}
?>

<?php 
$api = new clAPI('http://gdata.youtube.com/feeds/api/standardfeeds/most_recent');
$api->param('v', 2);
if ($api->parse('1 hour')) {
    ?>
	<h4><?php 
    echo $api->get('title');
    ?>
</h4>
	<?php 
    $api->info();
    ?>
	<?php 
    foreach ($api->get('entry', 10) as $entry) {
        ?>
		<?php 
        // this nasty bit extracts the video id from entry@id:
        preg_match('/video:([^\\:]+)/i', $entry->get('id'), $matches);
        $id = $matches[1];
<?php

require_once '../src/coreylib.php';
clAPI::configure('debug', true);
$feedburner_uri = 'coreylib-cookbook';
$api = new clAPI('https://feedburner.google.com/api/awareness/1.0/GetFeedData');
$api->param('uri', $feedburner_uri);
if ($api->parse('10 minutes')) {
    ?>
	<h4><?php 
    echo $api->get('feed@uri');
    ?>
</h4>
	<p>
		<?php 
    echo $api->get('feed/entry[0]@hits');
    ?>
 hits 
		as of <?php 
    echo date('F j', strtotime($api->get('feed/entry[0]@date')));
    ?>
</p>
	</p>
<?php 
}
Exemplo n.º 3
0
<?php

require_once '../src/coreylib.php';
clAPI::configure('debug', true);
$api = new clAPI('http://feeds.technorati.com/search/iphone?language=n');
if ($api->parse()) {
    ?>
	<?php 
    $api->info();
}
?>


Exemplo n.º 4
0
 function parse($cacheFor = 0)
 {
     $this->signAWSECS();
     return parent::parse($cacheFor);
 }
Exemplo n.º 5
0
<?php

require_once '../src/coreylib.php';
clAPI::configure('debug', true);
clAPI::configure('trace', false);
$api = new clAPI('http://buzz.googleapis.com/feeds/thepythonist/public/posted');
$api->parse();
$api->info();
echo $api->first('//feed:author/feed:name');
Exemplo n.º 6
0
<?php

require_once '../src/coreylib.php';
clAPI::configure('debug', true);
clAPI::configure('trace', false);
?>

<?php 
$delicious_username = '';
$delicious_password = '';
$api = new clAPI('https://api.del.icio.us/v1/posts/recent');
$api->basicAuth($delicious_username, $delicious_password);
if ($api->parse('5 minutes')) {
    ?>
	<?php 
    $api->info();
    ?>
	<h4><a href="http://delicious.com/"<?php 
    echo $delicious_username;
    ?>
">Delicious/<?php 
    echo $delicious_username;
    ?>
</a></h4>
	<ul>
		<?php 
    foreach ($api->get('post') as $post) {
        ?>
			<li style="clear:both;">
				<a href="<?php 
        echo $post->get('@href');
Exemplo n.º 7
0
<?php

require_once '../coreylib.php';
// create a new instance of the coreylib clAPI class
$api = new clAPI('http://twitter.com/statuses/user_timeline.xml?screen_name=collegeman');
// parse the feed!
$api->parse('10 minutes');
// analyze your feed with the info() method:
$api->info();
?>

<style>
* {
	font-family: Tahoma, sans-serif;
}

ul {
	list-style-type: none;	
	margin: 0;
	padding: 0;
}

ul li {
	padding: 10px;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border: 1px solid #ccc;
	margin: 0 0 10px 0;
}
</style>