Hey all
I need some help. I was wondering how I could make either a block or a module that would grab headlines from http://www.townhall.com/columnists/ and display them in the block/module, linking the user who clicks the link to the original website of the story.
How can i do this? any help would be appreciated.
How to get a BLOCK to GRAB headlines and link to its story?
Moderator: General Moderators
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
You just need to grab the page using fopen() and fgets() and then parse away the data until you are left with the headlines and the little story intro. You know roughly where the headlines start as there is the "todays featured articles" bit in bold that you can look for, once you find that you can ignore everything before that, and then find where the headlines finish, and ignore everything after that.