Dead Link Checker

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
17 posts Page 1 of 2
Contributors
User avatar
Adroxxx
Member
Member
Posts: 26
Joined: Sat Aug 21, 2010 1:46 pm

Dead Link Checker
Adroxxx
Is someone able to make a dead link checker? hehaho;
User avatar
bisnes_niko
Serious Programmer
Serious Programmer
Posts: 409
Joined: Tue Aug 24, 2010 1:21 pm

Re: Dead Link Checker
bisnes_niko
Well, I use

On load;
Code: Select all
If CheckLink("www.hastalavistababytrolollthiswebsiteshouldnotbeexisting.com/super.html") = False then : msgbox("This link is dead ;(") : Else : Msgbox("This link isn't dead! hurray")
and add this code piece inside the Public Class Form1, end class
Code: Select all
Private Function CheckLink(ByVal Address as String) as Boolean
Try
my.computer.network.ping(Address)
catch ex as exception
Return False
end try
return true
End function
YES, fixed D:
Last edited by bisnes_niko on Wed Sep 08, 2010 4:55 pm, edited 1 time in total.
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

Re: Dead Link Checker
Axel
kinda good idea i made a library a while ago but i quitted vb :D this would be a good idea for a library...
http://vagex.com/?ref=25000
User avatar
Adroxxx
Member
Member
Posts: 26
Joined: Sat Aug 21, 2010 1:46 pm

Re: Dead Link Checker
Adroxxx
Image

Did I do something wrong?
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

Re: Dead Link Checker
Axel
Adroxxx wrote:
Image

Did I do something wrong?
you forgot the address

so you need to do "Checklink("http:/www.codenstuff.com")"
thats why i love "ByVal" :D
http://vagex.com/?ref=25000
User avatar
bisnes_niko
Serious Programmer
Serious Programmer
Posts: 409
Joined: Tue Aug 24, 2010 1:21 pm

Re: Dead Link Checker
bisnes_niko
Woopsie... My bad did this too fast :o
User avatar
Adroxxx
Member
Member
Posts: 26
Joined: Sat Aug 21, 2010 1:46 pm

Re: Dead Link Checker
Adroxxx
It always says that my link is dead even if my link isnt cryer;
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Dead Link Checker
mandai
You don't use Ping on a HTTP URL.
Use WebClient.DownloadData, if there is an error you can catch it in an exception.
User avatar
Axel
Coding God
Coding God
Posts: 1928
Joined: Sun Jun 27, 2010 9:15 pm

Re: Dead Link Checker
Axel
Adroxxx wrote:
It always says that my link is dead even if my link isnt cryer;
cuz u returned true ?

maybe you should change the "try" a little bit
Code: Select all
Try 
my.network.ping(adress)
return true
catch ex as exception
Msgbox(ex.message)
return false
end try
http://vagex.com/?ref=25000
User avatar
bisnes_niko
Serious Programmer
Serious Programmer
Posts: 409
Joined: Tue Aug 24, 2010 1:21 pm

Re: Dead Link Checker
bisnes_niko
Things you dont want to happen, happens when you do the thing too fast :S
17 posts Page 1 of 2
Return to “Tutorial Requests”