Youtube chromeless player

Gestart doorKlaasie22 reacties117 weergaven

23 berichten · pagina 1 van 2

Klaasie

Lid · Topicstarter

Berichten
5.498
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallo,

Voor mijn nieuwe site wil ik controleren of het youtube id wat je invult ook echt bestaat maar ik kan nergens vinden hoe ik dit moet doen.
Weet iemand hoe ik dit moet doen?

Groeten,

Klaasie.

PS: Voor degene die het fixt; 0,05.


Nieuw probleem: http://www.one2xs.com/threads/36701&p=2#543461
0
Berichten
9.953
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Als het voor Muziektop is, kan ik je misschien wel gratis helpen! biggrin
0
Klaasie

Lid · Topicstarter

Berichten
5.498
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Sebastiaanh schreef:
Als het voor Muziektop is, kan ik je misschien wel gratis helpen! biggrin
Ja, het is voor MuziekTop biggrin (Kom anders ff op MSN)
0
Berichten
9.953
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Klaasie schreef:
Eerdere citaten tonen
Sebastiaanh schreef:
Als het voor Muziektop is, kan ik je misschien wel gratis helpen! biggrin
Ja, het is voor MuziekTop biggrin (Kom anders ff op MSN)
Heb een andere MSN
0
Klaasie

Lid · Topicstarter

Berichten
5.498
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nog steeds niet opgelost, iemand die me nog kan helpen?
0
Berichten
5.274
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien

Eindhoven, Nederland

[COLOR= #0000BB]<?php
    $video[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]545ik1j43k2[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//545ik1j43k2 bestaad niet en xGF3sc6bPsM bestaad wel.[/COLOR]

    [COLOR= #0000BB]$ch[/COLOR] [COLOR= #007700]=[/COLOR] curl_init[COLOR= #007700]();[/COLOR]

    curl_setopt[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_URL[COLOR= #007700],[/COLOR] [COLOR= #DD0000]http://www.youtube.com/watch?v=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$video[/COLOR][COLOR= #007700]);[/COLOR]
    
    [COLOR= #0000BB]$content[/COLOR] [COLOR= #007700]=[/COLOR] curl_exec[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]);[/COLOR]
    
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$content[/COLOR] [COLOR= #007700]===[/COLOR] FALSE[COLOR= #007700])[/COLOR]
        [COLOR= #0000BB]$img_content[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]Curl error: [/COLOR] [COLOR= #007700].[/COLOR] curl_error[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]);[/COLOR]

    [URL="http://www.php.net/else"]else[/URL] 
    [COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]If you have recently uploaded this video, you may need to wait a few minutes for the video to process.[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$content[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$video[/COLOR][COLOR= #007700]);[/COLOR]

        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$video[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]]))[/COLOR]
            [COLOR= #FF8000]//fout[/COLOR]
        [URL="http://www.php.net/else"]else[/URL]
           [COLOR= #FF8000]//goed[/COLOR]
        
    [COLOR= #007700]}[/COLOR]
    curl_exec[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]);[/COLOR]
    
    curl_close[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #FF8000]//BEDANKT LUUKVDO VOOR JE LOTERIJ SCRIPT, HEB DIT HIERVAN (A)[/COLOR]
?>


Niet getest, maar zou in de buurt moeten komen.
Want als de video niet bestaad komt er deze text: "If you have recently uploaded this video, you may need to wait a few minutes for the video to process." daar kijk je naar of die bestaad in de URL, zo ja, dan dan is het fout, zo nee dan is het goed.
0
Berichten
3.314
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Als een filmpje niet bestaat bestaat de pagina wel he, je moet controleren of er een flash applet staat met hetzelfde idee, dat kan al met file_get_contents
0
Klaasie

Lid · Topicstarter

Berichten
5.498
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kyron schreef:
Als een filmpje niet bestaat bestaat de pagina wel he, je moet controleren of er een flash applet staat met hetzelfde idee, dat kan al met file_get_contents
Dat is dus juist het probleem, als de pagina gwn niet bestond als het filmpje niet bestaat dan had ik het zelf allang gefixt alleen dit is dus niet het geval..
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
$id[/COLOR]     [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]id van filmpje[/COLOR][COLOR= #007700];[/COLOR] 
[COLOR= #FF8000]//goed: rRxccy-zcJ8 
//fout: rRxccab-zcJ8[/COLOR]
[COLOR= #0000BB]$link[/COLOR]    [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]http://www.youtube.com/watch?v=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$id[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR]
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](@[/COLOR][URL="http://www.php.net/fopen"]fopen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$link[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"r"[/COLOR][COLOR= #007700])) {[/COLOR]
            [COLOR= #0000BB]$status[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Het filmpje bestaat!"[/COLOR][COLOR= #007700];[/COLOR]
            [COLOR= #FF8000]//GOED![/COLOR]
        [COLOR= #007700]}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
            [COLOR= #0000BB]$status[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Helaas, het filmpje bestaat niet."[/COLOR][COLOR= #007700];[/COLOR]
            [COLOR= #FF8000]//FOUT![/COLOR]
        [COLOR= #007700]}
    }[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL][COLOR= #0000BB]$status[/COLOR][COLOR= #007700];[/COLOR]
?>


Werkt perfect, net getest.
(van internet, veranderd en unbugt)
0
Klaasie

Lid · Topicstarter

Berichten
5.498
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Gamedealer schreef:
[COLOR= #0000BB]<?php
$id[/COLOR]     [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]id van filmpje[/COLOR][COLOR= #007700];[/COLOR] 
[COLOR= #FF8000]//goed: rRxccy-zcJ8 
//fout: rRxccab-zcJ8[/COLOR]
[COLOR= #0000BB]$link[/COLOR]    [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]http://www.youtube.com/watch?v=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$id[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$link[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]) {[/COLOR]
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](@[/COLOR][URL="http://www.php.net/fopen"]fopen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$link[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"r"[/COLOR][COLOR= #007700])) {[/COLOR]
            [COLOR= #0000BB]$status[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Het filmpje bestaat!"[/COLOR][COLOR= #007700];[/COLOR]
            [COLOR= #FF8000]//GOED![/COLOR]
        [COLOR= #007700]}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
            [COLOR= #0000BB]$status[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Helaas, het filmpje bestaat niet."[/COLOR][COLOR= #007700];[/COLOR]
            [COLOR= #FF8000]//FOUT![/COLOR]
        [COLOR= #007700]}
    }[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL][COLOR= #0000BB]$status[/COLOR][COLOR= #007700];[/COLOR]
?>
Werkt perfect, net getest.
(van internet, veranderd en unbugt)

Hij werkt inderdaad, ik stuur je de punten biggrin (Kan je me ook via PM vertellen hoe het script nou eigenlijk in elkaar zit?)
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Of deze smile
[COLOR= #0000BB]<?php
$youtube_link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]http://www.youtube.com/watch?v=[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]

[URL="http://www.php.net/if"]if[/URL][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= #0000BB]$youtube_link[/COLOR][COLOR= #007700]))
{[/COLOR]
    
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Bestaat[/COLOR][COLOR= #007700];
    
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Bestaat niet![/COLOR][COLOR= #007700];[/COLOR]
?>
0
Klaasie

Lid · Topicstarter

Berichten
5.498
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Oké, ik gebruik nu die van GameDealer en die werkt perfect smileMaar toch bedankt Shahiem.

Op dit topic kan wat mij betreft een slotje.
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Shahiem schreef:
Of deze smile
[COLOR= #0000BB]<?php
$youtube_link[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]http://www.youtube.com/watch?v=[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]

[URL="http://www.php.net/if"]if[/URL][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= #0000BB]$youtube_link[/COLOR][COLOR= #007700]))
{[/COLOR]
    
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Bestaat[/COLOR][COLOR= #007700];
    
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Bestaat niet![/COLOR][COLOR= #007700];[/COLOR]
?>
Waarom zou je dit: $data = gebruiken??
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Er zat nog iets bij. Waarmee je titel kon ophalen, die heb ik er uitgehaald. Wss komt die variable daarvan.
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