Hi, I have a little problem with a script which I set up a while back. The script connects to a text file on a product supplier's site which has lists of all of the products which are currently in stock. I then run a script to update my database with all out of stock products so that they don't appear on my site.
It works like a dream, except that BT just cut the cables for the suppliers web server. This means that my script can't connect to the text file, and I get horrible error messages.
Does anybody know how to implement an error detection that will prevent the script from running if the connection to the external text document cannot be made. I obviously want it so that the script is simply ignored, and no error messages are presented.
Is there a script which says "if this url can be found then run the script below"
My connection code below:
Code:
Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objXmlHttp.open "GET", "http://www.domain.com/available.csv", False
objXmlHttp.send
strTextFile = objXmlHttp.responseText
Thanks