Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic (http://www.programmingforums.org/forum18.html)
-   -   How do i download a web page source code using vb? (http://www.programmingforums.org/showthread.php?t=4006)

codetaino May 20th, 2005 12:49 PM

How do i download a web page source code using vb?
 
I need to be able to read a web page source code, to extract information from it.

I know how to do this in other languages... but for some reasons (probably my lack of knowledge in VB) i cant even find a web page on google that have the answer... if someone can give me some code or point me in the right direction maybe telling me which function or object is used... i would be greatly thankfull...

-codetaino

tempest May 20th, 2005 1:16 PM

Look up socket programm in VB.. the basic concept is this.

Example (Using http://mysite.com/index.html)
:

1) Open socket connction to mysite.com on port 80
 2) Send get request packet...
    2a) GET /index.html HTTP/1.1
 3) Get the response on the socket from the server (put in response variable)...
 4) Strip headers from response...
 5) Close socket conneciton...
 6) Resulting response variable is source code


I used google to find this, it might be of some use...
http://www.freevbcode.com/ShowCode.asp?ID=2024

codetaino May 20th, 2005 5:11 PM

thanks for all your help... i have found some web sites... and check the one you sugested... I really appreciate your help


All times are GMT -5. The time now is 6:15 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC