/ Published in: PHP
Expand |
Embed | Plain Text
<?php // Get the Twitter search results $xml = simplexml_load_file("http://search.twitter.com/search.atom?q=vespa%20scooter"); // Prints the returned array to the page so you can see what's up // print_r($xml); ?> <ol id="search-results"> <?php foreach($xml->entry as $e){ $status_link = $e->link[0]['href']; $user_name = $e->author->name; $user_link = $e->author->uri; $thumb = $e->link[1]['href']; ?> <li class="hentry status search_result"> <span class="thumb vcard author"> <a class="tweet-url profile-pic" href="<?=$user_link?>"><img alt="" src="<?=$thumb?>" width="48" height="48" /></a> </span> <span class="status-body"> <a class="tweet-url screen-name" href="<?=$user_link?>"><?=$user_name?></a> <span id="msgtxt6185685937" class="msgtxt en"><?=$e->content?></span> </span> </li> <?php } ?> </ol>
You need to login to post a comment.
