save content of a page

Discussion in 'PHP' started by mehdiali, Nov 2, 2007.

  1. #1
    hi every one
    i want to create a program like google cache or yahoo cache.
    so i need a function in php to save content of a specific page.
    i kinow that php has a function for this .
    some thing like ob_get_contents();
    thank you .

     
    mehdiali, Nov 2, 2007 IP
  2. Lordy

    Lordy Peon

    Messages:
    1,643
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #2
    there is no built in function to cache an external page.
     
    Lordy, Nov 2, 2007 IP
  3. exodus

    exodus Well-Known Member

    Messages:
    1,900
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    165
  4. xemiterx

    xemiterx Peon

    Messages:
    62
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ob_get_contents() is for output buffering and not related to what you want. The easiest way to get the text of a web page is with file_get_contents(). Once you have the text in a string you can save it to a file or to your db.
     
    xemiterx, Nov 2, 2007 IP