Date: 22-05-02 01:53
Here's an idea that has been kicking around for a while. I want to compare two websites, the production one and my test one. This is just a simple test: make sure the two websites have the same commits over the past hour. Then we could run a cronjob from a third computer, compare the results of the two URLs and then post the results in a log.
The URLs would be very simple. They could be compare via diff.
Here is how I did it:
[dan@xeon:~/tmp] $ fetch -o test.txt http://test.freshports.org/backend/commits.php
fetch: test.txt: size of remote file is not known
Receiving test.txt: 5671 bytes
5671 bytes transferred in 0.4 seconds (13.46 kBps)
[dan@xeon:~/tmp] $ fetch -o beta.txt http://migration.freshports.org/backend/commits.php
fetch: beta.txt: size of remote file is not known
Receiving beta.txt: 5671 bytes
5671 bytes transferred in 0.0 seconds (4.20 MBps)
[dan@xeon:~/tmp] $ diff beta.txt test.txt
Take it from there. Create the cronjob. Compare the two URLs. Store the results. Log it. Send off an email if there are differences, providing a URL to the differences.
Have fun. Take it as far as you want.
Dan Langille - webmaster