Since Gmail chat is unavailable through IMAP I have been trying to find a way to access them through curl. I know that you can log in to Gmail and read your emails using PHP and curl, but I have been unable to find a way to get just my chats. Is there a way for me to access them this way?
This works for google voice. Perhaps it'll work for google chat/talk as well.
https://github.com/aaronpk/Google-Voice-PHP-API
Related
I am trying to Create a Mail Box for each user and each user account will be connected to his email(Gmail, Outlook, etc). Now I am trying to connect email in real-time whenever they receive an email they also get in their mailbox. I can get receive the email through IMAP but it is not real-time I have to look for a new email after a specific time. I am looking for a package or library that can do it easily for me or any other solution. After searching I get only one solution which is IMAP and I also implemented it but now I need another solution that fits exactly. If anyone has any idea pls share. and what if I set up my own custom email server with a custom domain so how can I create such functionality with Laravel.
Why I am doing all this?
beceause I want this real time when ever user receive email his ticket will be created on behalf of email it does not need to wait until IMAP fetch and then ticket will be created or displayed.
Thanks in advance.
You do not really have any other option besides IMAP, unless you want to pair with specific services like Exchange Web Services.
PHP has a very comprehensive set of functions regarding IMAP. I would suggest checking it out. Unfortunately, there is not really anything you can do from within PHP to prevent having to poll.
My suggestion is checking in the background if new mails have arrived. For example by checking from within a cronjob. That way you don't have to initiate a new connection to an IMAP server every time a users visits the page.
IMAP docs
I want to access, view, modify Google docs but via a program written in php.
I would prefer to use API protocol as it can be used by any language.
But apparently the API requires me to be signed in in a browser. Now if I want to make a server side script that apparently wont be running in a browser, how can I do that?
I didnt found any username/password/auth giving thing that returns me some token and the API can use that token.
https://developers.google.com/google-apps/spreadsheets/#changing_contents_of_a_cell
google would not know who sent the second request if it does not has the access token or some way to prove that it logged in a minut a go. in my case: the program (lets say php server)
I guess this would not help https://developers.google.com/google-apps/spreadsheets/#authorizing_requests for https://developers.google.com/google-apps/spreadsheets/#changing_contents_of_a_cell as the later has no access token option.
You should authenticate your clients with OAuth2 and then store the tokens in db: https://developers.google.com/drive/web/auth/web-server
Also there's a client library available from Google: https://developers.google.com/api-client-library/php/
Edit: As you said it's about the spreadsheet API I'm linkin directly to the spreadsheet API authentication documentation: https://developers.google.com/google-apps/spreadsheets/#authorizing_requests_with_oauth_20 seems they support OAuth2 too.
Thanks to all but I found something working exactly as required.
http://framework.zend.com/manual/1.12/en/zend.gdata.html
Until recently we have been using the old gapi php class to extract Google Analytics data from a variety of sites that we manage.
In a nutshell at night the sites download the Analytics data and stores it locally. Until recently it worked beautifully but all of a sudden we started receiving all sorts of weird errors like CaptchaRequired.
Anyway I've done some reading and got the impression that it was time we move to the new Google APIs platform and while I have tried to follow the HelloAnalyticsAPI tutorial we initially got a 403 error but now after leaving it for a while when I try and run the app I get redirected to Google to login.
I just don't seem to be able to get my head around it. We need to completely automate this process so redirecting to login on the Google site isn't going to cut it.
Can anyone help? Anyone seen these issues?
Use google api client for php, it's easy
http://code.google.com/p/google-api-php-client/
And dev guide for analytics (V3):
https://developers.google.com/analytics/devguides/config/mgmt/v3/
Google sends Captcha responses if they are unsure about the authenticity of the request. This can be caused by multiple requests from the same IP for various different accounts, use of the ClientLogin authentication mechanism, and even weak passwords on the account you are logging in to.
To prevent them, I would recommend using OAuth 2.0 for the authentication - there are other security benefits to using this too.
I'm trying to create an application that uses Google OAuth for login, and then scans through the users email to see the last time they emailing certain people.
So the user logs in with Google OAuth, and then inputs johndoe#gmail.com --> I want to be able to search through their gmail to tell them the last time they spoke.
I can get "feeds" of their inbox, and other folders, but I can't find a way to query for an email.
Yes you can access a user's mail with OAuth and the IMAP protocol. There is specifications on how to use the OAuth and IMAP combination on developers.google.com, check the links from here: https://developers.google.com/google-apps/gmail/oauth_overview
PHP has good support for the IMAP protocol: http://php.net/manual/en/book.imap.php
You can use imap_search() in PHP for searching for messages with IMAP: http://www.php.net/manual/en/function.imap-search.php
Edit: Sorry, the PHP IMAP support does not work with OAuth. You should use the Zend_Mail_Protocol_Imap, which has the functionality to authorize with an IMAP server using OAuth. Using the method requestAndResponse, it is possible to make an IMAP SEARCH request.
I need advice and how to got about setting up a simple service for my users. I would like to add a new feature where users can send and receive emails from their gmail account. I have seen this done several times and I know its possible.
There use to be a project for "Libgmailer" at sourceforge but I think it was abandoned. Is anyone aware of anything similar?
I have found that Gmail has a Python API but my site is making use of PHP.
I really need ideas on how to best go about this!
Thanks all for any input
any library/source that works with imap or pop will work.
Well if Google didn't come up with anything personally I'd see if I could reverse engineer the Python API by implementing it and watching it with a packet sniffer. My guess is it's just accessing some web service which should be pretty easy to mimic regardless of the language you're using.
Just a thought, Gmail supports POP/IMAP access. Could you do it using those protocols? It would mean asking your users to go into their gmail and enable it though.