cuongpd / gapi-google-analytics-php-interface

Automatically exported from code.google.com/p/gapi-google-analytics-php-interface
0 stars 0 forks source link

Failed to autheticate user #56

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
<?php
define('ga_email','xxxxx@gmail.com');
define('ga_password','xxxxxxx');

require 'gapi.class.php';

$ga = new gapi(ga_email,ga_password);

$ga->requestAccountData();

foreach($ga->getResults() as $result)
{
  echo $result . ' (' . $result->getProfileId() . ")<br />";
}

i have also added  gpi.class.php  

it is showing me error 

 Fatal error: Uncaught exception 'Exception' with message 'GAPI: Failed to authenticate user. Error: "Request failed, fopen provides no further information"' in C:\wamp\www\gapi-1.3\gapi.class.php on line 418
( ! ) Exception: GAPI: Failed to authenticate user. Error: "Request failed, 
fopen provides no further information" in C:\wamp\www\gapi-1.3\gapi.class.php 
on line 418

can anyone help me in this ..asap..please...

Original issue reported on code.google.com by koneruka...@gmail.com on 7 Jun 2011 at 11:32

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
allow curl extension in your php.ini

Original comment by Stanisla...@gmail.com on 15 Jul 2011 at 10:25

GoogleCodeExporter commented 9 years ago
thank you for the solution ;)

Original comment by anzaikun on 13 Oct 2011 at 6:08

GoogleCodeExporter commented 9 years ago
I did this, but to no avail.  Running on my localhost, Win 7, Apache, PHP5 5.3.8

Original comment by jus...@resonate.co.za on 4 Nov 2011 at 3:38

GoogleCodeExporter commented 9 years ago
I have the same problem. 

Original comment by martin...@googlemail.com on 17 Nov 2011 at 11:21

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have the same problem. Running on my localhost, xampp...
curl is also enabled...

Original comment by koshti.m...@gmail.com on 8 Apr 2012 at 4:43

GoogleCodeExporter commented 9 years ago
Do you run through a proxy server?  If the answer is yes then you need to 
provide the proxy settings in the file gapi.class.php.  Hope this help.

Original comment by g1ngerni...@hotmail.com on 18 May 2012 at 3:14

GoogleCodeExporter commented 9 years ago
I put all information in to the code 
<?php
define('ga_email','gmailaccount@gmail.com');
define('ga_password','password');

require 'gapi.class.php';

$ga = new gapi(ga_email,ga_password);

$ga->requestAccountData();

foreach($ga->getResults() as $result)
{
  echo $result . ' (' . $result->getProfileId() . ")<br />";
}

I get error
Exception: GAPI: Failed to request account data. Error: " Error 404 (Not 
Found)!!1 *{margin:0;padding:0}html,code{font:15px/22px 
arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% 
auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > 
body{background:url(//www.google.com/images/errors/robot.png) 100% 5px 
no-repeat;padding-right:205px}p{margin:11px 0 
22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media 
screen and 
(max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right
:0}} 404. That’s an error. The requested URL 
/analytics/feeds/accounts/default?start-index=1&max-results=20 was not found on 
this server. That’s all we know. " in 
C:\wamp\www\gapi-1.3\gapi.class.php on line 92

Original comment by gtlddoma...@gmail.com on 3 May 2013 at 6:31