I'd like to run a script that checks various URL's and alert me if a change has been made.
I would seem easy, I could use filemtime() or filesize() and compare that vs. info stored in my database for that specific URL. I guess either works great if comparing statistics for a static page ... but what can I do to get a value for comparison if it's a dynamic page? (Like http://Domain.com/page.cfm?id=12345)
Any way to compare? OR can I use my script to 'capture' the contents and "look" for a specific string within the page? If so - how?
Thanks in advance for whatever you can suggest!
Jeff
Monitoring a URL on another server...
Moderator: General Moderators
-
jeffrydell
- Forum Commoner
- Posts: 77
- Joined: Thu Jan 17, 2008 4:39 pm
- Location: Menasha, WI
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Monitoring a URL on another server...
You can use file and treat the remote file as a live feed.
Then save it to a string and do a compare.
Then save it to a string and do a compare.
-
jeffrydell
- Forum Commoner
- Posts: 77
- Joined: Thu Jan 17, 2008 4:39 pm
- Location: Menasha, WI
Re: Monitoring a URL on another server...
Got it - I can look for the string which indicates that page has what I want, then display the page IF in_array(). Perfect - thanks!
Jeff
Jeff
Last edited by jeffrydell on Fri Aug 01, 2008 12:03 pm, edited 1 time in total.
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Monitoring a URL on another server...
Sorry, I did not mean to make it more confusing for you.
Ignore the bit about the live feed. But lookup file function on php.net
Ignore the bit about the live feed. But lookup file function on php.net
-
jeffrydell
- Forum Commoner
- Posts: 77
- Joined: Thu Jan 17, 2008 4:39 pm
- Location: Menasha, WI
Re: Monitoring a URL on another server...
I tinkered a bit, learned and have a successful fix ... thanks so much!
Jeff
Jeff