Want to get the latest headlines? This recipe will let us use the "news" keyword to return the ten latest headlines.
This recipe will let us search
News:used
, for the latest headlines from Yahoo News. Create a file called news.php
in the pages
folder and add the following code to it:
<?php $results = news( ); $i = 1; $reply = array(); foreach($results->item as $item){ $msg = $item->title; $reply[] = $msg; } print_sms_reply( $reply ); function news( ){ $yelpql = 'select title from rss where url="http://rss.news.yahoo.com/rss/topstories" LIMIT 10'; $result = getResultFromYQL( $yelpql ); return $result->query->results; } ?>