Home »
Imported messages »
comp.lang.php »
Tokan error & 401 fatal error while running google analytics API code on dedicated server
Tokan error & 401 fatal error while running google analytics API code on dedicated server [message #169725] |
Fri, 24 September 2010 06:25 |
neha rathi
Messages: 4 Registered: September 2010
Karma:
|
Junior Member |
|
|
Hi,
My trying a code to get page visits of all domains of my google
analytics account. My code is running properly on local xampp server &
i am getting visits for all domains but when i run the same code on
dedicated server. It gives me error as
401
Fatal error: Uncaught exception 'Exception' with message 'Permission
Denied - <HTML> <HEAD> <TITLE>Token invalid</TITLE> </HEAD> <BODY
BGCOLOR="#FFFFFF" TEXT="#000000"> <H1>Token invalid</H1> <H2>Error
401</H2> </BODY> </HTML> ' in /home/gauravhm/public_html/seo/admin/
domain_add/googleanalytics.class.php:274 Stack trace: #0 /home/
gauravhm/public_html/seo/admin/domain_add/
googleanalytics.class.php(195): GoogleAnalytics->_postTo('https://
www.goo...', Array, Array) #1 /home/gauravhm/public_html/seo/admin/
domain_add/googleanalytics.class.php(116): GoogleAnalytics-
> _callAPI('https://www.goo...') #2 /home/gauravhm/public_html/seo/
admin/domain_add/visits.php(76): GoogleAnalytics->getReport(Array) #3
{main} thrown in /home/gauravhm/public_html/seo/admin/domain_add/
googleanalytics.class.php on line 274
I am not understanding why this is happening? I echoed the responce of
google analytics API then I am getting 'http_code' == 200 on local but
401 on dedicated server.
curl is also properly installed..It showing curl is activated on local
& server also properly.
Can somebody please help.
|
|
|
Goto Forum:
Current Time: Fri Nov 29 03:50:02 GMT 2024
Total time taken to generate the page: 0.03679 seconds