Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

url resolution 1

Status
Not open for further replies.

iminore

Programmer
Sep 3, 2002
50
0
0
GB
Does anyone have any info on url resolution. I don't mean parsing or validating the syntax of an url - actually checking programmatically that it exists.
 
There are many (free) components like this:

or you could examine the output of a ping:
Code:
<% 
    cUrl = "[URL unfurl="true"]www.tek-tips.com"[/URL]
    Set oWShell = CreateObject("WScript.Shell") 
    Set oCmd = oWShell.Exec("ping " & cUrl) 
    cPing = oCmd.StdOut.Readall() 
    set oCmd = nothing
    Set oWShell = nothing 

    if left(cPing,7) = "Unknown" then
     response.write cUrl & " does not exist"
    end if
%>

(but of course this is not completely true: the side may be down)

ttmug.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top