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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i check urls?

Status
Not open for further replies.

jalex84

Programmer
Dec 2, 2003
2
ES
I have to maintain a web page with lots of external links, it is in my interest to ensure that the links are functioning.Many web page design tools, such as FrontPage, have a "validate links" command ,they tell you which links are OK and which are not, but they do not permit you to do anything about the bad links . I need to do that in VB.


thank you
 
I think you need to be a little more specific about how you’re going about this, and what exactly you need it to do. You could for example: If you test a link and it is bad, open the source code for your webpage and search for the bad link and add it to a “bad link” file and delete it from your page then save your page and it’s gone…

If this doesn’t help please elaborate
 
Here's a stab at it.

Add the Microsoft Intenet Transfer Control to your project and do something like:

on error Resume Next
do until NoMoreLinks
strUrl = TheNextLink
Inet1.OpenURL(strUrl)
if err.number <> 0 then
'Bad Link Do Something About it
end if
err.Clear
loop
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top