Google Account + PHP

How could i login into google account with username and password programatically without entering into login page
LVL 5
vineethvpAsked:
Who is Participating?
 
HackneyCabConnect With a Mentor Commented:
Google have their OAuth API described here:

http://code.google.com/apis/accounts/docs/OAuth.html

I decided against using it because it requires that your Google Accounts admin username and password be embedded within your source code, which seems risky to me (I'm on shared web hosting).

I did ask Google whether it's possible to create a read-only account that can simply query, say, Analytics data, without any admin access (such as changing email address, settings, etc). Google never did reply to that question.
0
 
ygouthamCommented:
curl functions in php which allows you to do something like that
0
 
ygouthamCommented:
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Ray PaseurCommented:
Before you spend too much time trying to do this with CURL (possible in theory, unlikely in practice) please contact Google and get written permission to access their web services this way.  For some of the services an API key is used.  Others are public and require no keys.

The central issue here is whether Google, as owner of the service and data, endorses your desired method of access.  If they do, you will find them very helpful in creating the tools you need to get at the data.  If they do not, they will tell you and you will have saved yourself from a lot of technical frustration and a legal nightmare.

Best of luck with your project, ~Ray
0
 
Ray PaseurCommented:
@HackneyCab: that's a great suggestion.  I believe that Twitter is going to use OAuth, too.

I use shared web hosting for lots of things and have not yet run into any issue with compromised passwords.  If you trust your web host to keep your data base, you kind of have already trusted them with something pretty important.  So I just keep my passwords out of the web root and live with that level of risk.
0
 
vineethvpAuthor Commented:
THanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.