views:

48

answers:

3

I am sorry if this is an RTFM question, I am a C programmer by trade and have almost no knowledge of web technologies. I would be very grateful if you could point me in the right direction and I will R the M :)

The issue I need to solve is as follows, I need to get some data for my site users from different websites where they might have an account. Take, for example, the number of unread mails in a person's inboxes on various mail servers. Is there a way where I can ask the user for their mail username and password and get the data? (The user will be given prior information on why the details are being asked.) Is there any mechanism where I don't have to ask for the credentials and instead just redirect the user to the respective servers and let them handle the authentication because all I am interested in is the number.

Update: I don't intend to use C here, I would like to know what technology is best suited for this purpose and then would learn that.

+3  A: 

it really depends on the services you are trying to interact with, some may offer api's eg facebook, flickr, etc others you may need to masquerade as a web browsers and log in on their behalf then use a regex to parse the web page for the bits you want

i am not familiar with c, but i use php, and in php you would use the curl library. http://nz2.php.net/curl

i am assuming here that curl comes from a c background, so it might be something you are familiar with.

bumperbox
A: 

Yes. Like others said, it depends what you want. Many mail services will offer one of POP, IMAP, or some custom API. Gmail supports all three, including a special Atom feed just for unread mail. It even has APIs for things like contacts/address book.

On the other hand, some web mail services won't support anything, and you'd have to use screen-scraping, possibly violating the TOS.

Matthew Flaschen
A: 

Maybe you should read this post from Jeff about giving passwords away.

But as bumperbox has answered, or there is an existing API to connect to other systems, or you'll have to loggin as a browser.

MaLKaV_eS
I know, thats why I am reluctant in taking the user credentials. I would prefer if it can be done in any other way.