Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

ASP question - checking if external page has been updated.

Options
  • 21-03-2006 2:35pm
    #1
    Registered Users Posts: 2,647 ✭✭✭


    What I want to do is this, host a script on my own site that will execute once a day and check if a html page on an external site has changed and then e-mail me if it has.

    The e-mail part I can do, pretty much everything else is beyond my limited ken at the moment. Does anyone know of a way to do this, or some topics I could research which might provide a way?


Comments

  • Closed Accounts Posts: 850 ✭✭✭DOLEMAN


    Does it have to be written in ASP?

    I know in PHP you could use something like -

    <?php
    $contents = file_get_contents($the_exact_url);
    if ($contents != $yesterdays_contents)
    // e-mail me
    $yesterdays_contents = $contents
    ?>

    And set it up to run as a cron...


  • Registered Users Posts: 2,647 ✭✭✭impr0v


    I managed to sort this out.
    I used an XMLHTTP object (help from www.4guysfromrolla.com) to get the html of the static page and check it against stored data in a database. If the code isn't the same, it then checks it for the words I'm looking for in the updated html before updating the stored data with the new version and sending me an e-mail saying it has changed.

    The time period issue I got around by using the script as my firefox home page with a response.redirect to my usual home page, so the script runs every time I start my browser.


Advertisement