file get contents

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vinpkl
    New Member
    • Oct 2008
    • 41

    file get contents

    hi all

    Code:
    <?php
    $article = file_get_contents('http://www.domain.com/article_eng.html');
    $qry="insert into article_data (article) values('$aricle')";
    $result=mysql_query($qry);
    ?>
    with this function i can crawl my html page and fetch its content and add in database.

    but i would like to know that my html page has

    1) article title
    2) author name
    3) description

    i dont want any images or any other data like nav, header, footer.

    so how will i fetch these 3 things separately.

    vineet
    Last edited by Dormilich; Nov 18 '09, 01:42 PM. Reason: fixed [code] tags
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    if you provide these 3 items in the meta data, you can easily fetch them separately.

    Comment

    Working...