|
From: Marcus B. <ma...@la...> - 2004-03-18 22:26:25
|
Hi...
Jason Sweat wrote:
> Sounds reasonable to me. I did not get a chance to reply to your "todo"
> requests earlier. Mine would lean towards supporting https (perhaps via the
> curl extension?)
PHP4.3+ already supports this (just put 'tls:' as part of the socket
address) although I've not tried it out. My problem with this is the
hassle of setting up a test environment that is available on the web. I
use my home site as part of the tests for SimpleTest and HTTPS si not
supported by default. If someone could donate a permanent test server
that would be OK. Otherwise it would have to be an unsupported feature.
If I add it would you be willing to test and debug it? :)
>
> In addition to my web site monitoring idea,
One of my work colleagues is setting up some scripts to work with the
Naggios monitoring tool. Should be interesting to hear his conclusions
when he's done.
> a) configure a script to login as me
$browser = &new SimpleBrowser();
$browser->get('http://.../login.html');
$browser->setField('username', 'Jason');
$browser->setField('password', 'secret');
$browser->clickSubmit('Log in');
> b) check the status daily
Can't remember my cron syntax :(.
> c) if the due date is tomorrow, attempt to renew
$browser->get('info.html');
preg_match(
'/Due date (\d+\/\d+\/\d+)/',
$browser->getContent(),
$matches);
if (! is_pending($matches[1])) {
exit(0);
}
> d) check the renewal, and on failure email me
$browser->clickSubmit('Renew');
if (strpos('Cannot', $browser->getContent()) == false) {
mail('jason@...', ...);
exit(1);
}
> this would be what I am thinking of as a "personal web agent". Seems like many
> of the pieces are in the web tester.
One thing that was unexpected thing about this project is that having
automated control of the web environment is useful for all sorts of
development tasks. Makes me think the web browser component should have
been kept separate.
yours, Marcus
--
Marcus Baker, ma...@la..., no...@ap...
|