mbgupta
asked on
Reading a Hyperlink on a Web Page
Hi Experts,
This is what i am trying.
Through a VB Program, i want to open a browser, and go to a perticular web page on the Internet. For eg i open
http://www.google.com/search?hl=en&ie=UTF8&oe=UTF8&q=Mohit
Now i want to go to the web page which is the first Hyperlink of the Search result.
Can i do this
Meaning the Link will say "Mohit Gupta's Homepage"
and the source will be say "www.mohit.com"
Can i get the source code i.e. "www.mohit.com"
through the VB Program - or can i some how go to this web page through my VB program.
I will be greatful if you can help me in achiving this.
Thanks a bunch in anticipation!!!!
Regards
Mohit
This is what i am trying.
Through a VB Program, i want to open a browser, and go to a perticular web page on the Internet. For eg i open
http://www.google.com/search?hl=en&ie=UTF8&oe=UTF8&q=Mohit
Now i want to go to the web page which is the first Hyperlink of the Search result.
Can i do this
Meaning the Link will say "Mohit Gupta's Homepage"
and the source will be say "www.mohit.com"
Can i get the source code i.e. "www.mohit.com"
through the VB Program - or can i some how go to this web page through my VB program.
I will be greatful if you can help me in achiving this.
Thanks a bunch in anticipation!!!!
Regards
Mohit
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I am more or less with Bobbit but for second approach, you could use HTML Object library to do it (parse stuff) and you get the advantage of Object model.
ASKER
Thanks very much!!!
your welcome :)
Dat = Inet1.OpenURL("http://www.google.com/search?hl=en&ie=UTF8&oe=UTF8&q=Mohit")
Dat would be the HTML information on the page. You can then parse the Dat, and find the first search result link.
I hope this helps. Good luck!