|What are the problems associated with retrieving email using CURL?||#1|
A new feature I wish to add to our local network is the ability to retrieve email from free email services such as Gmail, Yahoo and Hotmail using PHP. There are services we can pay for but I would rather hack it up myself!
I find that Google only has an API but the rest do not. What are the problems associated then with me just retrieving email using CURL?
I have even implemented the GMail part using CURL and PHP.
posted date: 2009-04-11 13:17:00
|Re: What are the problems associated with retrieving email using CURL?||#3|
posted date: 2009-04-11 13:25:00
|Re: What are the problems associated with retrieving email using CURL?||#4|
Is it not allowed to use CURL to retrieve email from these service providers?? Or any form of email retrieval for that matter?
posted date: 2009-04-11 13:40:00
|Re: What are the problems associated with retrieving email using CURL?||#5|
posted date: 2009-04-11 13:46:00
|Re: What are the problems associated with retrieving email using CURL?||#6|
It almost certainly violates their terms of service to screen-scrape their websites for that purpose. If they redesign your site, the scripts you(re using to parse out the e-mail contents etc. will probably break catastrophically, as well.Yahoo, Gmail, and Hotmail all support POP3, a standard protocol for retrieving e-mails. Why not use that instead?
posted date: 2009-04-11 14:38:00
|Re: What are the problems associated with retrieving email using CURL?||#7|
When someone gives you an API, they(re promising you that "if you run code X, Y will happen. When you screen scrape, there(s no such promise from the provider, and many providers have items in their terms of service that explicitly forbid screen scraping. From a technical standpoint, this means their page/application may undergo changes that will break your screen scraping, wither accidently or purposefully by the provider. This is why CAPTCHA(s exist. Also, increasingly, these applications are using more and more "AJAX" style architectures, which means you(re committing yourself to reverse engineering how their application works, as well as keeping up with the changes each application makes. Finally, well, you(re doing it wrong. Email is a set of protocols in and of itself. Most providers have a way to access email via POP3 and IMAP. I(d look into hacking PHP code to interact with the POP/IMAP servers which, like an API, are a promised set of behaviors. You also have the advantage that code written for one provider will likely work (with minor tweaks) for another.
posted date: 2009-04-11 14:48:00
|Re: What are the problems associated with retrieving email using CURL?||#8|
Ah, Thank you for the explanation. These were things I was afraid of and you have provided a solution.
posted date: 2009-04-12 00:58:00
|select page: « 1 »|