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 8785387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:20:47+00:00 2026-06-13T21:20:47+00:00

I was trying to follow this answer: https://stackoverflow.com/a/3331372/1063287 So in my php document I

  • 0

I was trying to follow this answer:

https://stackoverflow.com/a/3331372/1063287

So in my php document I had the variables below:

$json = file_get_contents("https://gdata.youtube.com/feeds/api/videos/{$video_id}?v=2&alt=json");
$json_data = json_decode($json);
$video_title = $json_data->{'entry'}->{'title'};
$video_date = $json_data->{'entry'}->{'published'};
$video_duration = $json_data->{'entry'}->{'media:group'}->{'yt$duration'};
$video_views = $json_data->{'entry'}->{'yt$statistics'}->{'viewCount'};
$video_description = $json_data->{'entry'}->{'content'};

but that gave me the error:

Warning: file_get_contents() [function.file-get-contents]: URL
file-access is disabled in the server configuration in
/home/path/to//file.php on line 12

Warning:
file_get_contents(https://gdata.youtube.com/feeds/api/videos/xx-xxxxxxx?v=2&alt=json)
[function.file-get-contents]: failed to open stream: no suitable
wrapper could be found in /home/path/to/file.php on line 12

I have looked at the developers guide here:

https://developers.google.com/youtube/2.0/developers_guide_php

and can understand the feed and entry structure here:

https://developers.google.com/youtube/2.0/developers_guide_protocol_understanding_video_feeds#Understanding_Video_Entries

and have found a few solutions (one involving curl) but they either haven’t worked or I haven’t known if they were the best method to use.

Can anyone please tell me if there is anything wrong in the above code?

  • 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-06-13T21:20:49+00:00Added an answer on June 13, 2026 at 9:20 pm

    This is most likely because you do not have OpenSSL installed on your server. Try installing it, and if it still doesn’t work it’s probably because you have HTTP access disabled in your php.ini (set allow_url_fopen to true)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a newbie to sql and am trying to follow this example here: http://net.tutsplus.com/tutorials/php/a-better-login-system/
I'm trying to follow this documentation on Symfony : http://symfony.com/doc/current/book/forms.html ok so here is
I have been trying to follow this tutorial: http://www.androidhive.info/2012/01/android-login-and-registration-with-php-mysql-and-sqlite/ . It is to create
Trying to follow this example. (Section String sorting...) Is there anything obvious that would
I am trying to follow this article to do the same for adding a
I'm trying to follow this tutorial using StructureMap : http://iridescence.no/post/Constructor-Injection-for-ASPNET-MVC-Action-Filters.aspx What I'm trying to
I'm trying to follow this tutorial on Seesaw Window Building . During the step
I am trying to follow this tutorial ( Using-core-plot-in-an-iphone-application ). When I try to
I'm trying to follow this guide to play around with Google Predict from the
I am trying to follow this tutorial on how to connect to a database

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.