|
Posted by gosha bine on 05/08/07 10:02
jerryyang_la1@yahoo.com wrote:
> Hi
> Is it possible to use a PHP script to detect if a web site is up and
> available ?
>
> and detect if a certain string of words is visible ??
>
> ie: if 'welcome to my site' is shown then the site is ok.. BUT if
> 'Connection Error' is shown on the web page then the site is down.
>
> Also is it possible to detect if MySQL is working ?
>
> If either the http, or the 'connection error' string or MySQL errors
> are detected can I be emailed ??
>
> Any Ideas ?
>
> Thanks :)
>
Yes, use file functions (or, better, CURL) to obtain page content, then
check it against a list of regular expressions.
--
gosha bine
extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok
Navigation:
[Reply to this message]
|