Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 21st, 2006, 07:38 AM
Authorized User
 
Join Date: Sep 2006
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to get contact addresses from websites(yahoo)

hi all,

There is a website which maintains friends n colleagues informaton.
I want to develop API using webservices that must must provide....
1. given a websites user’s account id and password, collect all the contacts of the member and download all the contacts’ profile details.
There no local database to store the contact information..i've get the info from the website(frommycontacts sections) and
segreagate that info and to store in a database.

it should be just like this

http://www.contactsimporter.net/test...est/index.aspx

How can i acheive this...

  #2 (permalink)  
Old September 21st, 2006, 09:13 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

IMHO, i am not going to freely enter my email address and password into some online xyz application, regardless if it says that my password isnt being stored on the server i am still providing that information.

As far as writing your own API, go to the various providers and grab their tech documents on how to interact with their services.

--Stole this from a moderator

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
  #3 (permalink)  
Old September 28th, 2006, 07:38 AM
Authorized User
 
Join Date: Sep 2006
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi dparsons,

I get the contacts page as html content by this code.Now..i need only selected content ie only contacts (which r in div/table tag) not a complete page.





private void Button1_Click(object sender, System.EventArgs e)
{

HttpWebRequest webRequest = WebRequest.Create(LOGIN_URL) as HttpWebRequest;
StreamReader responseReader = new StreamReader(webRequest.GetResponse().GetResponseS tream());
string responseData = responseReader.ReadToEnd();
responseReader.Close();
string uid = txtuid.Text.Trim();
string pwd=txtpwd.Text.Trim();
// extract the viewstate value and build out POST data
// string viewState = ExtractViewState(responseData);
string postData = String.Format("session_key={0}&session_password={1 }&session_login=Submit",uid, pwd);

// have a cookie container ready to receive the forms auth cookie
CookieContainer cookies = new CookieContainer();

// now post to the login form
webRequest = WebRequest.Create(LOGIN_URL) as HttpWebRequest;
webRequest.Method = "POST";
webRequest.ContentType = "application/x-www-form-urlencoded";
webRequest.CookieContainer = cookies;

// write the form values into the request message
StreamWriter requestWriter = new StreamWriter(webRequest.GetRequestStream());
requestWriter.Write(postData);
requestWriter.Close();


// we don't need the contents of the response, just the cookie it issues
webRequest.GetResponse().Close();

// now we can send out cookie along with a request for the protected page
webRequest = WebRequest.Create(url of contacts page) as HttpWebRequest;
webRequest.CookieContainer = cookies;
responseReader = new StreamReader(webRequest.GetResponse().GetResponseS tream());

// and read the response
responseData = responseReader.ReadToEnd();
responseReader.Close();
Response.Write(responseData);



}


pls suggest me to complete this

Surya


  #4 (permalink)  
Old September 28th, 2006, 07:50 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You are going to have to parse your Response streams to extract the data you want.

--Stole this from a moderator

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
  #5 (permalink)  
Old October 3rd, 2006, 01:08 AM
Authorized User
 
Join Date: Sep 2006
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

dparson,

 i parsed the webpage and i got the data avialable in table tag if webpage ...but i want to filter this data..i don't want images and junk data in my response stream..
is there any way to filter response data which is assigned to string variable?..


Surya

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validate multiple email addresses mat41 Javascript 1 August 29th, 2007 12:45 AM
Validate multiple email addresses... mat41 Javascript 5 March 16th, 2006 12:17 AM
SQL query for email addresses clearsky SQL Language 1 October 7th, 2005 10:15 PM
Network printer addresses interrupt Javascript How-To 6 September 2nd, 2004 10:37 AM



All times are GMT -4. The time now is 12:31 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.