Youtube video

Gestart doorAllard4 reacties40 weergaven

5 berichten · pagina 1 van 1

Allard

Lid · Topicstarter

Berichten
970
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Beste,

Is er een script dat bekijkt of de youtube video bestaat? Bijvoorbeeld:

> Bestaat
http://www.youtube.com/watch?v=one2xs > Bestaat niet
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Kijken of er een titel kon worden gevonden of niet?
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
$video_id[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]nFarfLDotT0[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/file_get_contents"]file_get_contents[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]http://gdata.youtube.com/feeds/api/videos/[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/urlencode"]urlencode[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$video_id[/COLOR][COLOR= #007700]));[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]Video not found[/COLOR] [COLOR= #007700]||[/COLOR] [COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]Invalid id[/COLOR] [COLOR= #007700]||[/COLOR] [COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]==[/COLOR] false[COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]video_id bestaat niet[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]dit video_id bestaat op Youtube.com[/COLOR][COLOR= #007700];
}[/COLOR]
?>
0
Allard

Lid · Topicstarter

Berichten
970
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dank je . Het werk prima!
0
Berichten
262
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
bedankt sjoerdpompom had ik net nodigpompom
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren