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

  • SEARCH
  • Home
  • 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 608687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:29:13+00:00 2026-05-13T17:29:13+00:00

i am using a youtube api php and have problem… OS: debian, php 5.2

  • 0

i am using a youtube api php and have problem…
OS: debian, php 5.2

<?php
    require_once 'Zend/Loader.php';
    Zend_Loader::loadClass('Zend_Gdata_YouTube');

    $yt = new Zend_Gdata_YouTube();
    $query = $yt->newVideoQuery();
    $query->setQuery($searchTerm);
    $query->setStartIndex($startIndex);
    $query->setMaxResults($maxResults);

    $feed = $yt->getVideoFeed($query);

    echo '<pre>';
    print_r($yt);

This code is empty return, but next code..

<?php
    require_once 'Zend/Loader.php';
    Zend_Loader::loadClass('Zend_Gdata_YouTube');

    $yt = new Zend_Gdata_YouTube();
    /*$query = $yt->newVideoQuery();
    $query->setQuery($searchTerm);
    $query->setStartIndex($startIndex);
    $query->setMaxResults($maxResults);

    $feed = $yt->getVideoFeed($query);*/

    echo '<pre>';
    print_r($yt);

has returned the object…

Zend_Gdata_YouTube Object
(
    [_defaultPostUri:protected] => 
    [_registeredPackages:protected] => Array
        (
            [0] => Zend_Gdata_Media_Extension
            [1] => Zend_Gdata_Media
            [2] => Zend_Gdata_YouTube_Extension
            [3] => Zend_Gdata_YouTube
            [4] => Zend_Gdata_Kind
            [5] => Zend_Gdata_Extension
            [6] => Zend_Gdata
            [7] => Zend_Gdata_App_Extension
            [8] => Zend_Gdata_App
        )

    [_httpClient:protected] => Zend_Http_Client Object
        (
            [config:protected] => Array
                (
                    [maxredirects] => 5
                    [strictredirects] => 1
                    [useragent] => Zend_Http_Client
                    [timeout] => 10
                    [adapter] => Zend_Http_Client_Adapter_Socket
                    [httpversion] => 1.1
                    [keepalive] => 
                    [storeresponse] => 1
                    [strict] => 1
                    [output_stream] => 
                )

            [adapter:protected] => 
            [uri:protected] => 
            [headers:protected] => Array
                (
                    [user-agent] => Array
                        (
                            [0] => User-Agent
                            [1] => MyCompany-MyApp-1.0 Zend_Framework_Gdata/1.10.0
                        )

                )

            [method:protected] => GET
            [paramsGet:protected] => Array
                (
                )

            [paramsPost:protected] => Array
                (
                )

            [enctype:protected] => 
            [raw_post_data:protected] => 
            [auth:protected] => 
            [files:protected] => Array
                (
                )

            [cookiejar:protected] => 
            [last_request:protected] => 
            [last_response:protected] => 
            [redirectCounter:protected] => 0
        )

    [_majorProtocolVersion:protected] => 
    [_minorProtocolVersion:protected] => 
    [_useObjectMapping:protected] => 1
)

Why? Where a problem?
Sorry for bah english

  • 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-13T17:29:13+00:00Added an answer on May 13, 2026 at 5:29 pm

    ………

        require_once 'Zend/Loader.php';
        Zend_Loader::loadClass('Zend_Gdata_YouTube');
    
        $yt = new Zend_Gdata_YouTube();
        $query = $yt->newVideoQuery();
        $query->setQuery($searchTerm);
        $query->setStartIndex($startIndex);
        $query->setMaxResults($maxResults);
    
        $feed = $yt->getVideoFeed($query);
    
        echo '<pre>';
        print_r($yt);
    

    Instead of $yt, see what you have got in $feed eg:

        echo '<pre>';
        print_r($feed);
    

    has returned the object…

    This is because you are using print_r on object eg:

    $yt = new Zend_Gdata_YouTube();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 508k
  • Answers 508k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Rows isn't strongly typed - so there will be a… May 16, 2026 at 4:28 pm
  • Editorial Team
    Editorial Team added an answer You mean, create additional, non-standard button on the keyboard? Try… May 16, 2026 at 4:28 pm
  • Editorial Team
    Editorial Team added an answer Well, you need each node to have something which effectively… May 16, 2026 at 4:28 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am using Zend Gdata to interface with the YouTube API from a PHP
I'm trying to set up a quick PHP demo using the Youtube API that
I'm using PHP and the YouTube API to get videos from YouTube to feed
In my project i have to use youtube api and play only audio of
how can i get the last 50 comments from a Youtube-video using the Api?
I make an AJAX request like so using JQuery: $.ajax({ type: GET, url: getvideo.php,
I'm using simpleXML to parse this xml file . It's a feed I'm using
Currently i'm using the following, which seems quite slow for multiple clips: static function
I've got this Chrome extension , and it uses jQuery to open a new
My software encodes videos using the standard Windows AVIFile functionality. That means, it can

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.