Hallo,
Ik probeer via een code achter de titel te komen van youtube filmpje ik heb nu dit
Maar snap hier niks van? Wie kan me helpen
Afbeelding niet beschikbaarDe bron kon niet worden geladen (One2xs).Bron openen ↗
Ik probeer via een code achter de titel te komen van youtube filmpje ik heb nu dit
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]function[/COLOR] getYouTube[COLOR= #007700]([/COLOR][COLOR= #0000BB]$id[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$wat[/COLOR][COLOR= #007700])
{[/COLOR]
[COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"http://gdata.youtube.com/feeds/api/videos/"[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$id[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$xml[/COLOR] [COLOR= #007700]= new[/COLOR] DOMDocument[COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$xml[/COLOR] [COLOR= #007700]->[/COLOR]load[COLOR= #007700]([/COLOR][COLOR= #0000BB]$link[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$xml[/COLOR][COLOR= #007700]->[/COLOR]getElementsByTagName[COLOR= #007700]([/COLOR][COLOR= #0000BB]$wat[/COLOR][COLOR= #007700])->[/COLOR]item[COLOR= #007700]([/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700])->[/COLOR]nodeValue[COLOR= #007700];
}[/COLOR]
?>
GEBRUIKEN:
[COLOR= #0000BB]<?php
$titel[/COLOR] [COLOR= #007700]=[/COLOR] getYouTube[COLOR= #007700]([/COLOR][COLOR= #DD0000]YOUTUBE ID[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]title[/COLOR][COLOR= #007700]);[/COLOR]
?> Maar snap hier niks van? Wie kan me helpen
Afbeelding niet beschikbaarDe bron kon niet worden geladen (One2xs).Bron openen ↗
Mijn functie 
