|
-
May 16th, 2001, 06:58 PM
#1
Thread Starter
Registered User
Is it there?
I dont know any VB Script just to tell ya.
I want to use vb script to see if a website exists. If it does then go to it, otherwise go to a different one. Is this possible?
p.s. Client side
-
May 17th, 2001, 12:10 AM
#2
Guru
Code:
<script language="VBScript">
msgbox(VerifySite("http://www.vbforums.com"))
msgbox(VerifySite("http://www.asl;fjasdlfkjasd;lf.com"))
function VerifySite(SiteName)
on error resume next
dim objXMLHTTP
dim strText
set objXMLHTTP = createobject("Microsoft.XMLHTTP")
objxmlhttp.open "GET", SiteName, false
objxmlhttp.send
strText = objxmlhttp.responsetext
if trim(strText) = "" then
VerifySite = false
else
VerifySite = true
end if
set objxmlhttp = nothing
end function
</script>
-
May 17th, 2001, 05:40 PM
#3
Thread Starter
Registered User
-
May 17th, 2001, 08:39 PM
#4
Good Ol' Platypus
Can you also use that object to go to a site and find it's title?
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
May 18th, 2001, 02:54 PM
#5
Good Ol' Platypus
Cheers!
I'll be using that to find out names of sites when people type in addresses, in my forums
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|