Login to Gmail Inbox using Curl?
I'm doing a project where user will first save his gmail id and password and after confirmation,I will provide a link for directly login to gmail next time without entering his gmail id and password.. the saved password will passed as a parameters of userid and passwd using CURL
I'm doing this using php.. I heard about curl to do this.. I tried lots of code but didn't get 开发者_如何学Pythonany working code.. Can anyone tell me.. how do i just login to gmail inbox .. using CURL in PHP ??
If you're just interested in reading the emails in a Gmail inbox you should forgo the cURL pseudo-browser path; instead, enable POP or IMAP on the Gmail account and use PHP's excellent IMAP/POP3 functions to access the Gmail inbox.
If on the other hand you're trying to create some sort of single-sign-on service you're straight out of luck. Why is this? Well, even if your server manages to authenticate and persist cookies from Gmail, you have no way of storing these Gmail cookies in the client's browser. Only requests that originate from mail.google.com can set Gmail cookies. This is known as Same origin policy.
精彩评论