monitoring changing web pages

R

Rod Snyder

I am looking to try to build a program that monitors a specific page and
emails a group when the page changes. Any suggestions on modules to use or a
general description of how to build this would be appreciated.

Rod
 
B

Ben Morrow

Quoth "Rod Snyder said:
I am looking to try to build a program that monitors a specific page and
emails a group when the page changes. Any suggestions on modules to use or a
general description of how to build this would be appreciated.

LWP
Net::SMTP or Mail::Mailer or MIME::Lite

Investigate your system's facilities for running programs on a schedule,
e.g. cron on unix, Scheduled Tasks on Win32.

Ben
 
G

GM

Purl said:
Rod Snyder wrote:

Sure a lot of recent postings coming out of comcast.
This is a statistical anomaly. I have noted a lot
of postings from comcast in the Apache group which
reference material in some of my old articles there.
Another statistical anomaly linked to comcast.

All of comcast is banished from our server. Lots
of statistical anomalies regarding comcast.

Paranoia strikes deep
Into your life it will creep
It starts when you're always afraid
You step outta line, the man come, and take you away

You better stop, hey...
 
J

John Bokma

Purl said:
Do make use of search engines. You will almost always
find precisely what you need, quite quickly.

Yeah, like Queen lyrics, or pictures of girls ;-)
 
K

krakle

Rod Snyder said:
I am looking to try to build a program that monitors a specific page and
emails a group when the page changes. Any suggestions on modules to use or a
general description of how to build this would be appreciated.

Rod

You don't need a module to do so.. Set the script on a scheduled cron.
Have the script check the file modification time/date on that specific
page once a day. If it changes, have the script email the group of
people. Simple.
 
S

Sherm Pendley

krakle said:
You don't need a module to do so..

You don't precisely *need* a module, true, but there are certainly modules
that will help make parts of it much easier.

As you say, cron is the way to schedule a periodic job, assuming a *nix
platform. Anacron might also be useful, if the machine running the script
sleeps and/or powers down occasionally.
Have the script check the file modification time/date on that specific
page once a day.
LWP.

If it changes, have the script email the group of people.

Quite a few modules to choose from here - search CPAN for "Mailer", "SMTP",
and "MIME".

sherm--
 
K

krakle

Sherm Pendley said:
You don't precisely *need* a module, true, but there are certainly modules
that will help make parts of it much easier.

True. But remember this is a pretty simple task...
As you say, cron is the way to schedule a periodic job, assuming a *nix
platform. Anacron might also be useful, if the machine running the script
sleeps and/or powers down occasionally.

Bottom line, set the script on a scheduler.

Why would you bother using LWP to fetch the modification date of a
LOCAL file? Just using "-M" would require less coding then LWP. Perl
is great because there are many ways to perform a task but I find it
pointless to use LWP in this case.
Quite a few modules to choose from here - search CPAN for "Mailer", "SMTP",
and "MIME".

Well i'm not going to suggest SMTP since the poster never mentioned
anything about it. To email a group of people why not have perl open
the mail program... Again, another pointless reason to use a module.
 
S

Sherm Pendley

krakle said:
Why would you bother using LWP to fetch the modification date of a
LOCAL file?

Who said anything about local files? The OP said he wanted to monitor "a
specific page".
Well i'm not going to suggest SMTP since the poster never mentioned
anything about it. To email a group of people why not have perl open
the mail program...

That might be easier in the short term, but it's harder to maintain over
time. If you start using a different mail program, or someone else wants to
use your script, you wind up having to rewrite it.

Also, a large majority of desktop machines (i.e. Windows) don't have a mail
program that Perl can call, but they often do have access to an SMTP
server.

sherm--
 
K

krakle

Sherm Pendley said:
Who said anything about local files? The OP said he wanted to monitor "a
specific page".

My mistake, Sherm. I was under the assumption he was trying to monitor a local file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top