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.
using CURL or other method to access email contacts
Moderator: General Moderators
Re: using CURL or other method to access email contacts
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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: using CURL or other method to access email contacts
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.
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.
-
cpetercarter
- Forum Contributor
- Posts: 474
- Joined: Sat Jul 25, 2009 2:00 am
Re: using CURL or other method to access email contacts
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.