Ping website with DLL

W

Wayne-I-M

Hi

This may not be possible but ....... :) and also may be the wrong place to
ask but many people on here seem to know lots about things like this, so....

I have a number of FP websites and I need to know when the server is down or
working - it's does seem to be down a lot ???
I have a small DLL set up that checks when my internet connection is up and
running and when it's not.

This is the DLL

:TOP
@echo off
for /f "delims=." %%X in ('ping -n 1 google.com') do if "%%X"=="Request
timed out" (echo %date% %time% >> C:\pingfail.txt)
sleep 300
GOTO TOP

All this does is to ping google and tell me if the ping comes back or not.
I have set up an access database to collect the info and created a report - I
know it could be done in excel but I write access all the time so it's just
simpler for me that way.

OK - can the code above be altered or something else written to do this. ???

There is a site that I have been looking at and it has an option group
(dropdown) that has months (as text).
June
July
August
etc
etc

Is there any way that I can ping this site to know when the text March
appears in the option group.

I can set up the ping to run every 10 mins or so.

Any ideas - can it be done ?
 
W

Wayne-I-M

Or (just a thought) has anyone ever set up windows scheduler to run internet
explorer, refresh a website (could make it the default) and then check of a
item of text in the source

ha ha ha like I said may not be possible.

I hope it is
 
J

Jon Spivey

What language are you using? It should be easy enough to connect to a site
read the HTML and check for a character, eg in asp
<%
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", "http://google.com", false
xmlhttp.send ""
if instr(xmlhttp.responseText, "whatever") > 0 then
' do something
end if
%>

If you wanted to schedule this via windows you could make it a .vbs file
then set it up through task scheduler.

Cheers,
Jon
 
W

Wayne-I-M

Hi Jon

Thanks for the helps.

1st thing to say is that I write databases and I'm really out of my depth
with websites, even though I have a few up and running for our company they
are all very simple.

I can task scheduler to open the website. No problems there.
But what I need is some sort of notice when a specific text string is found
on the page. It could be ABC or XYZ or (more likely) March.

I can get a simple bit of code to send me an SMS to my mobile phone.
But ???
How would I get an automated search for the text string

I can create a simple BAT file to run this and then store the results and
this would be picked up by the database and if the string is found then
notify me.
The only problem I'm having is how to search the HTML for the text string

Any Ideas ???
 

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

Top