Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2007
    Posts
    824
    Tokens
    71

    Latest Awards:

    Default Pretty Simple PHP Question

    I need a way to take the entire content of a certain webpage and save it every 30 minutes. So I guess the best way to do it would be by running a cronjob every 30 minutes that uses file_get_contents() and writes the contents to a txt file right?

    Also is there a way to save the source code as well?
    Vouches
    [x][x]

  2. #2

    Default

    I'm not sure, but you could probably use fread to read all the contents then fwrite to write them into another file.

  3. #3
    Join Date
    May 2009
    Location
    England
    Posts
    24
    Tokens
    2,011

    Latest Awards:

    Default

    I'm pretty sure you'd need to use a CRON job if you want to run it so often automaticly, can I ask why you want to do this? I always it a lot easier to help somebody when I understand what they want to do and why they want to do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •