Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6092441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:26:34+00:00 2026-05-23T12:26:34+00:00

How download cvs file with google authorization in google trends service – have to

  • 0

How download cvs file with google authorization in google trends service – have to use zend framework classes and not other php ways .

Thanks,

Yosef

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:26:34+00:00Added an answer on May 23, 2026 at 12:26 pm

    This could be what you need. You need to enter your Google username and password in the $email and $passwd variables and to setup the autoloader or require ZF classes.

    References: Zend_Gdata_ClientLogin and ClientLogin

    // setup the autoloader first or require used classes
    // using the example code in the example to get auth tokens
    try {
        $client = Zend_Gdata_ClientLogin::getHttpClient($email, $passwd, 'xapi', $httpClient);
    } catch (Zend_Gdata_App_CaptchaRequiredException $cre) {
        echo 'URL of CAPTCHA image: ' . $cre->getCaptchaUrl() . "\n";
        echo 'Token ID: ' . $cre->getCaptchaToken() . "\n";
    } catch (Zend_Gdata_App_AuthException $ae) {
        echo 'Problem authenticating: ' . $ae->exception() . "\n";
    }
    
    // extract authentication tokens from response body
    $ck_count = preg_match_all('/^(.+)=(.+)$/m', $client->getLastResponse()->getBody(), $cookies);
    
    // build a new http client
    $auth = new Zend_Http_Client('http://www.google.com/trends/viz?q=facebook&graph=all_csv&sa=N');
    
    for ($i = 0; $i < $ck_count; $i++) {
        // authenticate it using the provided tokens as cookies
        $auth->setCookie($cookies[1][$i], $cookies[2][$i]);
    }
    // make the request and dump cvs data
    Zend_Debug::dump($auth->request()->getBody());
    

    Output given (truncated for brevity):

    facebook, facebook (std error)
    1.00, 0%
    
    
    Week, facebook, facebook (std error)
    Jan 4 2004, 0, >10%
    Jan 11 2004, 0, >10%
    Jan 18 2004, 0, >10%
    Jan 25 2004, 0, >10%
    Feb 1 2004, 0, >10%
    Feb 8 2004, 0, >10%
    Feb 15 2004, 0, >10%
    Feb 22 2004, 0, >10%
    Feb 29 2004, 0, >10%
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I download GO compiler for windows from http://code.google.com/p/gomingw/downloads/list . However, in Read Me file,
Download file already success but when install it has an error application-not-installed I already
i download many images form server,some images show well,but other not show: my key
I download a framework and code and I have a question regarding require and
i download a kml file : <?xml version=1.0 encoding=UTF-8?> <kml xmlns=http://www.opengis.net/kml/2.2> <Document> <Style id=transGreenPoly>
Can I safely download and install .Net framework 3.5 SP1 without requiring my customers
I download one program that read file and then parse double values from String
I download the *.ics file successfully from the mail attachment by using intent-filter. I
i download AlarmClock in the sound code of android,i have modified it,but i want
I download the ajaxcontroltookit.binary4 file from codeplex is there an installer to install ajax

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.