Vimeo API to fetch detail of multiple video in single request by PHP or Javascript

32 views Asked by At

I have implemented functionality to fetch single video by video URL from Vimeo, below is code for that:

$json_url = 'https://vimeo.com/api/oembed.json?url=' . $Videourl;
$ch = curl_init($json_url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);

From curl response, it returns with details like video duration, title etc.

Due to single curl request/response, it is taking more time, specially when I need to render multiple video details on web site page.

Is there any way, where I can send single request in PHP or javascript (where send multiple ID, URL of video) and receive information of multiple videos from Vimeo, so can increase loading time of the page and render content quickly?

0

There are 0 answers