View Single Post
Old 02-17-2009, 12:31 AM   #2 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,258
Thanks: 90
Wildhoney is on a distinguished road
Default

How about using regular expressions? For instance, you could use this little bit of code to get the latest 5 articles from TalkPHP, as displayed on the left of the website:

php Code:
$szContent = file_get_contents('http://www.talkphp.com/forums.php');
preg_match_all('~<td class="title" valign="top">(.+?)</td>~is', $szContent, $aMatches);

foreach ($aMatches[0] as $szArticle)
{
    printf("- %s<br />\n", $szArticle);
}
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote