Click here to Skip to main content
13,549,468 members
Click here to Skip to main content
Add your own
alternative version


77 bookmarked
Posted 26 Feb 2008
Licenced CPOL

Address Book Grabber

, 26 Feb 2008
Rate this:
Please Sign up or sign in to vote.
Address Book Grabber

I have got two ways to grab the address book from any website....

1. By using DownloadData and UploadValues methods of WebClient class:

The Basic algorithm is:

1. Create WebClient class object to get the methods for sending and receiving the data from a resource identified by a URL.

2. Set the user agent info in the header and set the proxy setting.

3. Download the login page.

4. By the Regular Expression Extract the desire name value collection which we have to send with login info for example user name, password etc. to get the address book.

5. Again set the header information’s such as user agent etc.

6. Upload the page and get the cookies information.

7. Download the address book page.

8. Create the name value collection.

9. set the header information such as cookies info, user agent etc.

10. Upload the page with name value collection it will return address book in byte array format.

Please refer the attached code file:

2. By using the HTTPWebRequest and HTTPWebResponse HTTP classes of the .NET framework:

The Basic algorithm is:

1. The first step for getting a web page is to instantiate an HttpWebRequest object. This occurs when invoking the static Create () method of the WebRequest class.

2. Set request header fields and user credentials.

3. Get response from the server in stream object and add user credential information with it.

4. Send further Request by sending cookie within the request.

5. Again use create () method to open address book page.

6. Get the response by sending cookie information with the request it will return address book page in byte array format.

Please refer the attached code file:


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer Persistent System Limited
India India
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionCould not download Contact_Importer_ - 2.31 KB Pin
Andrew G Avelin15-Mar-12 20:12
memberAndrew G Avelin15-Mar-12 20:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.180515.1 | Last Updated 27 Feb 2008
Article Copyright 2008 by Himanshu_Jain
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid