PHP Extraction from News Website

Discussion in 'PHP' started by khairulanuarmm, Dec 5, 2007.

  1. #1
    I want to create series of headlines news and partial news to my web page.
    WHat is the best options to extract news headlines together with source url, news content from others news web site? All headlines under <A>..</A> tag.

    Let say i want to extract from this para <P><A>main link...</A> news bla-bla</p>:

    <P><A class=anything href="http://some.news.com/aa/bb/content.asp?y=param1&param2=1205&param3..=vvv&pg=xx.htm">news headline 1</A><BR>
    news statement blaa-bla with a few lines.
    <BR clear=all></P>

    <<P><A class=anything href="http://mydom.new.net/content2.asp?y=param1&param2=1205&param3..=vvv&pg=xx.htm">news headline 2</A><BR>
    news statement blaa-bla with a few lines.
    <BR clear=all></P>
     
    khairulanuarmm, Dec 5, 2007 IP
  2. Gawk

    Gawk Peon

    Messages:
    427
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The best way is to get the rss feed from the news site. This will give you an xml file which you can do what you like with.
     
    Gawk, Dec 6, 2007 IP