How to get a list of links on a webpage!

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
14 posts Page 1 of 2
User avatar
Proprogrammer
VIP - Donator
VIP - Donator
Posts: 415
Joined: Sun Oct 03, 2010 11:14 pm

you will obviously need a webbrowser, also you will need a button for finding links, textbox, and finally a label to count how many links there are!

put this under the button1 click event

button1_clickevent
Code: Select all
 
        Dim a As Integer
        Dim b As String
        For a = 1 To WebBrowser1.Document.Links.Count - 1
            b = b & WebBrowser1.Document.Links(a).InnerHtml & vbCrLf
        Next
        TextBox1.Text = b
        Label1.Text = WebBrowser1.Document.Links.Count & " links."
    End Sub
How could this serve any use? well you can kind of make this like a online antivirus by trying to find any malicious sites that have been reported in the past.
------------------------------------------------------------------------------
Proprogrammer, not just a Programmer.
User avatar
M1z23R
VIP - Donator
VIP - Donator
Posts: 622
Joined: Tue Sep 28, 2010 4:55 pm

It is nice ...
But look, you can't get every link with "a" tag, some links start with for example "<img" - button link and many more other tags can be :)
But nice tutorial
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

The A tag is the only one that allows hyperlinking so I think this article is quite accurare.
Lewis
Coding God
Coding God
Posts: 1564
Joined: Sun Dec 20, 2009 2:12 pm

Yes M1z23R, Img can be hyperlinked, but using this code:
<a href="blah.com"><img src="awsomeface.png"/></a>

Well, to my knowlage :P
Image
User avatar
DarkyKnife
Top Poster
Top Poster
Posts: 109
Joined: Thu Apr 29, 2010 4:59 pm

What's wrong with you? You copied all your "tutorials" from http://www.reflectionforbrain.com , and why don't you give the credits to that great site?
Visit my Youtube chanel
User avatar
Proprogrammer
VIP - Donator
VIP - Donator
Posts: 415
Joined: Sun Oct 03, 2010 11:14 pm

look people i dont copy my tuts from that site all the time i just had all the tuts on a .txt so i dont remember where my tuts come from, so sorry i didnt give credit cause i forgot about that sites name, cause i dont bookmark that kind of stuff, so i am not trying to say it is mine, sorry.
------------------------------------------------------------------------------
Proprogrammer, not just a Programmer.
User avatar
Codex
Coding God
Coding God
Posts: 2028
Joined: Wed Mar 31, 2010 5:50 pm

Well thats a bad start, to just copy codes. You didn't say that this is yours, but you didn't say that its not yours.
You know, when you actually do make your own app that is cool, i don't think people will believe its yours or its your code.

It's just a tip, either you learn from it, or you will get haters.
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
User avatar
Proprogrammer
VIP - Donator
VIP - Donator
Posts: 415
Joined: Sun Oct 03, 2010 11:14 pm

K thanks i wont do that anymore!
------------------------------------------------------------------------------
Proprogrammer, not just a Programmer.
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1892
Joined: Wed Dec 16, 2009 9:56 pm

seems you've collected haters already
but either way its nice i suppose
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
hungryhounduk
VIP - Site Partner
VIP - Site Partner
Posts: 2870
Joined: Mon Jul 27, 2009 11:58 am

Hey all
Have you all forgotten the "REP" System that we have had in Place for like 8 months :)

I keep having to REPEAT this *Please USE the REP System instead of Posting Comments that are Spoiling the Posts/Threads...

That way You could at least give the Poster a Chance to EDIT the Post without the need to Diss People and leave it all on show for Our/New Members to read.

Chris
Image
14 posts Page 1 of 2
Return to “Tutorials”