title: Google Analytics PHP5 Interface always fails to show result
body: <p>I was trying to get pageviews and visits from my Google Analytics account, so I set an example like this: <a href="https://code.google.com/p/gapi-google-analytics-php-interface/" rel="nofollow">https://code.google.com/p/gapi-google-analytics-php-interface/</a> on my localhost, but somehow it isn't returning nothing... it always fails. </p>
  
  <p>This is my code(password and email omitted on purpose):</p>
  
  <pre><code>&lt;?php 
      require 'gapi.class.php';
  
      $gaEmail = 'email';
      $gaPassword = 'pass';
      $profileId = 'UA-37213064-1';
  
      $dimensions = array('pagePath','country', 'region', 'city'); 
      $metrics = array('visits');
      $sortMetric=null;
      $filter=null;
      $startDate='2011-02-01';
      $endDate='2015-01-30';
      $startIndex=1;
      $maxResults=10000;
  
      $ga = new gapi($gaEmail, $gaPassword);
  
      $ga-&gt;requestReportData($profileId, $dimensions, $metrics, $sortMetric, $filter,        $startDate, $endDate, $startIndex, $maxResults);
  
      $totalPageviews = $ga-&gt;getPageviews();
  
      foreach ($ga-&gt;getResults() as $result) {
         $visits = $result-&gt;getVists();
         print $visits; 
      }
  
  ?&gt;
  </code></pre>
  
  <p>It always fails here: </p>
  
  <pre><code>$ga = new gapi($gaEmail, $gaPassword);
  </code></pre>
  
  <p><strong>ERROR:</strong></p>
  
  <pre><code>PHP Fatal error:  Uncaught exception 'Exception' with message 'GAPI: Failed to authenticate user. Error: "Error=BadAuthentication
  Url=https://www.google.com/accounts/ContinueSignIn?sarp=1&amp;scc=1&amp;plt=AKgnsbttRRxx9DCBil669sL7kLRdff3nkCIN2ZZVwbU8erUozRAS9AUbn2wk7Rzjcotu7d3Hb7t3ihTxae_QFryWhZfF7uDfZDAL8GfF0w8CY8IopMZs9FEsmlkMlXczOKJ3QKLtEBGtPwCrjW69cI5U7NDe_WiPTWIZhXhf3znQjRU8TMrsNB6NNDMA_5zCwCMtTBYNB-tukpyRoFd3YS2HZfh4fJyDYA
  Info=WebLoginRequired
  "' in /Volumes/Macintosh Work/www/playground/gapi-1.3/gapi.class.php:418
  Stack trace:
  #0 /Volumes/Macintosh Work/www/playground/gapi-1.3/gapi.class.php(62): gapi-&gt;authenticateUser('Email...', 'password')
  #1 /Volumes/Macintosh Work/www/playground/gapi-1.3/teste.php(17): gapi-&gt;__construct('EMAIL...', 'password')
  #2 {main}
    thrown in /Volumes/Macintosh Work/www/playground/gapi-1.3/gapi.class.php on line 418
  </code></pre>