Page 1 of 1

using CURL or other method to access email contacts

Posted: Thu Sep 30, 2010 9:09 am
by mottwsc
I have a PHP application and am trying to allow users to import contacts from their favorite email systems. Right now, I'm targeting yahoo, gmail and hotmail - facebook friends would also be interesting. I'll need to allow users to log in, of course, and then have all of their contacts pulled into my application. From there, I'll present them to the user and allow them to pick which ones they want to email about my application. The important part is that I need to have control over what happens to the contact list to control certain aspects of my application.

So, here are my questions:
> Is CURL the right method to use to do this?
> Are there practical examples available that I can use and where might I find them?
> What things would I need to be aware of and prepare for regarding security/hacking since I'm accessing remote sites?

Thanks for your guidance.

Re: using CURL or other method to access email contacts

Posted: Thu Sep 30, 2010 9:54 am
by pickle
I'd see if each of those services have an API. Using a provided API will be much easier than screen scraping, or whatever else you're using cURL for.

Re: using CURL or other method to access email contacts

Posted: Thu Sep 30, 2010 3:53 pm
by Bind
commercial - http://curl.phptrack.com/
free - http://www.nqbao.com/2009/11/the-easy-w ... ntact-list

good luck trying to convince your visitors to share their email system login credentials.

Re: using CURL or other method to access email contacts

Posted: Fri Oct 01, 2010 1:54 am
by cpetercarter
Users will not, if they are sensible, simply give you their email usernames and passwords. Instead, you need to look at the APIs for the services you want to access. Gmail and Facebook (and possibly the others too - I haven't checked) have APIs which use OAuth to allow your application to access a users contact list/friends list. The user authorises your application to do this - if you have ever "authorised" a Facebook application, you will be familiar with the process.