That wouldn't work if your page changes on each load.. for example, mine has a banner ad that rotates with each load, a last updated date that changes a few times a day, and a copyright notice that changes yearly... so what I do is: 1. CFHTTP the page into a variable.. 2. I surround changeable areas with a string inside html comments (not cf comments - or they would not show up!) like '@@@start@@@' and @@@end@@@' . When I check the page I just snip out everything between those 2 strings. 3. I have a database table that stores every version of my index.cfm page - with those changeable areas removed. I just select the most recent version, compare it to the current page, and do nothing if they are the same. If they are different, I store the copy of the page into the database table, send myself an email and a text (I do this also if the server is not responding). 4. The email and text gives me a link which takes me to a page on the website that shows the last 2 versions side by side so I can easily see what changed.
another cool thing I do with it is when I call the page via cfhttp, I add a parameter that tells my index page to display some data from our database. I display my own information (which never changes) from a few different tables, such as my name, address, email, comment and a bunch of other things.. this automatically gets compared for each version and I get notified if it changes - to alert me to a sql injection attack. I make changes to the index page (outside of the changeable areas) maybe once a month or so - and when I do - I make sure I get that text message - to confirm the monitoring system works! On my todo list is to measure how long the page load takes and graph it over time, and alert me if it is much slower than normal. At 09:04 PM 11/18/2010, you wrote: >You store the hash (i.e. hash("index.cfm")) of the cfm file somewhere: >in another file, or in a table, etc. and check intermittently, like once >a day or hour. So, a job that checks for the MD5SUM of the files, and >maybe a database table that stores the files and the hashes. > >Awesome thing would be an ant script that during deployment >populates/updates a database table with all your files (or changed >files) and their MD5 hash, and then deploys the files. Or maybe just a >couple of important files to watch, like Application.cfc, index.cfm, com >directory, etc. > >Or do you guys think that's overboard? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339408 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm