Page 1 of 1

How to get a BLOCK to GRAB headlines and link to its story?

Posted: Sun May 23, 2004 7:07 pm
by drujr
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.

Posted: Fri May 28, 2004 9:02 pm
by kettle_drum
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.