D
D
Dmitry2021-09-07 14:47:05
YouTube
Dmitry, 2021-09-07 14:47:05

How to get YouTube video description with Curl?

Hello, please help me parse the title of a youtube video.

$url = yJcCKuxfb2o;
$youtube = "http://www.youtube.com/embed/" . $url . "&format=json";
$curl = curl_init($youtube);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$return = curl_exec($curl);
curl_close($curl);
$result = json_decode($return, true);
var_dump($result);


displays everything in errors, who can tell me, who can once again just crap crap.
php : null
You need to get the name of the video so that you can then insert it into your database. thanks who will help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
ThunderCat, 2021-09-07
@ThunderCat

SSL is required to perform this operation

" http://www.youtube.com/oembed?url= " _ _

s?

A
Artem Zolin, 2021-09-07
@artzolin

Youtube has a great API that gives you all the information you need about videos and channels.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question