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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:04:54+00:00 2026-06-11T08:04:54+00:00

Ok, working on a vimeo based video blog theme for wordpress and rather than

  • 0

Ok, working on a vimeo based video blog theme for wordpress and rather than lazily ask people to paste the embed code into each video update (via a custom field), I’d rather the user supplied just the video id… basically I can’t guarantee that each video is going to be the same height / width so I’m trying to get the embed code directly from vimeo (rather than getting the user to supply) rather than hardcoding a height / width for the iframe (as the theme is going to be responsive and I’m using a small jquery script to resize the videos on the fly)

So far, having tried to butcher Vimeo’s own API example, I’ve got this:

function curl_get($url) {
    $curl = curl_init($url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_TIMEOUT, 30);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
    $return = curl_exec($curl);
    curl_close($curl);
    return $return;
} 

// Create the URL
$oembed_vid_id = get_field('video_embed_code');
$oembed_url = 'http://vimeo.com/api/v2/video/' . $oembed_vid_id . '.xml';

// Load in the oEmbed XML
$oembed = simplexml_load_string(curl_get($oembed_url));
$embed_code = html_entity_decode($oembed->html);

<?php echo $embed_code ?>

But I get nothing back, have I overlooked something quite basic?

I can confirm that the $oembed_url URL does exist, try any vimeo id and you’ll see the relevant xml for it, i.e. here’s a video I’ve plucked from vimeo:

http://vimeo.com/api/v2/video/48198301.xml

Would be fantastic if I could get to grips with this as I’ll be able to pull down thumbnails etc. and make use of all that other lovely info tucked away in the xml file.

  • 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-11T08:04:55+00:00Added an answer on June 11, 2026 at 8:04 am

    From Vimeo’s Sample Code, it seems that you are not using the right API.

    http://vimeo.com/api/v2/video/ will return the video info fields, but doesn’t have a html field. To get the embed code, use this URL:

    $oembed_url = 'http://vimeo.com/api/oembed.xml?url=' . urlencode("http://vimeo.com/$oembed_vid_id");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a video codec for OMAP3430. I already have code written in
I am working on both udp/tcp based P2P for file and real time video
I am working on a video processing library in C# and would like to
We are working on a video processing application using EmguCV and recently had to
Recently i'm working with the dailymotion video API. However I not sure how to
I am working on an online video repository system for a client, written mostly
I am working on a small video chat software on windows which use RTP
Does anyone have a working example of a video player built using Qt phonon?
I am working on building a HTML5 video player with a custom interface, but
I am working with XML files that are generated by a digital video camera.

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.