Hallo allemaal,
Op deze site worden willekeurig nummers achter elkaar afgespeeld, alleen gebeurt het ook wel eens dat er 2x hetzelfde nummer (achter elkaar) word afgespeeld, en dit wil de eigenaar van de desbetreffende site voorkomen.
Heeft iemand een idee hoe hij dit kan doen? Misschien met behulp van cookies?
Hij gebruikt dit script:
Alvast bedankt voor jullie hulp!
Gr.
Jos
Op deze site worden willekeurig nummers achter elkaar afgespeeld, alleen gebeurt het ook wel eens dat er 2x hetzelfde nummer (achter elkaar) word afgespeeld, en dit wil de eigenaar van de desbetreffende site voorkomen.
Heeft iemand een idee hoe hij dit kan doen? Misschien met behulp van cookies?
Hij gebruikt dit script:
/*
* Polling the player for information
*/
// Update a particular HTML element with a new value
function updateHTML(elmId, value) {
document.getElementById(elmId).innerHTML = value;
}
// This function is called when an error is thrown by the player
function onPlayerError(errorCode) {
alert("An error occured of type:" + errorCode);
}
// This function is called when the player changes state
function onPlayerStateChange(newState) {
if(newState == 0)
{
javascript:location.reload(true);
}
// updateHTML("playerState", newState);
}
// Display information about the current state of the player
function updatePlayerInfo() {
// Also check that at least one function exists since when IE unloads the
// page, it will destroy the SWF before clearing the interval.
if(ytplayer && ytplayer.getDuration) {
// updateHTML("videoDuration", ytplayer.getDuration());
// updateHTML("videoCurrentTime", ytplayer.getCurrentTime());
// updateHTML("bytesTotal", ytplayer.getVideoBytesTotal());
// updateHTML("startBytes", ytplayer.getVideoStartBytes());
// updateHTML("bytesLoaded", ytplayer.getVideoBytesLoaded());
}
}
// This function is automatically called by the player once it loads
function onYouTubePlayerReady(playerId) {
ytplayer = document.getElementById("ytPlayer");
// This causes the updatePlayerInfo function to be called every 250ms to
// get fresh data from the player
setInterval(updatePlayerInfo, 250);
updatePlayerInfo();
ytplayer.addEventListener("onStateChange", "onPlayerStateChange");
ytplayer.addEventListener("onError", "onPlayerError");
}
// The "main method" of this sample. Called when someone clicks "Run".
function loadPlayer() {
// The video to load
var inhoud=new Array(); // regular array (add an optional integer
inhoud[0]="fC04ZZploBE"; // Eric Clapton - Wonderful tonight
inhoud[1]="bfqEisOIMJc"; // Tracy Chapman - Fast Car
inhoud[2]="u-rJ-6hBfSo"; // Bobby Mcferrin - Dont worry, be happy
inhoud[3]="Y4QGPWLY-EM"; // Eiffel 65 - Im blue
inhoud[4]="4njtmTEPQIo"; // R. Kelly - Gotham City
inhoud[5]="7gnRMPsHN1E"; // Spice Girls - Wannabe
inhoud[6]="lDIQGmglFW8"; // atomic kitten-whole again
inhoud[7]="LanCLS_hIo4"; // Bob Marley - Three little birds
inhoud[8]="hW93CV6m-JU"; // Gary Jules - Mad World
inhoud[9]="QgLfoQfmSQ4"; // Eagles - Hotel California
inhoud[10]="Va0vs1fhhNI"; // Lemon Tree - Fools Garden
inhoud[11]="Y62NQOu6UeQ"; // Otis redding - sitting on the dock of the bay
inhoud[12]="LbzBJXC-4Js"; // Coldplay - Viva la vida
inhoud[13]="sYAhku6gKQA"; // Natalie imbruglia - Torn
inhoud[14]="EylafK1IwHE"; // Backstreet Boys - I want it that way
inhoud[15]="0714IbwC3HA"; // The Beatles - Let it be
inhoud[16]="VyR7yoDBQSg"; // Beyonce - Halo
inhoud[17]="5-hxK8wMT28"; // 15 miljoen mensen
inhoud[18]="LbUpPVOEkdA"; // R. Kelly - I believe I can fly
inhoud[19]="QPLekztZbeI"; // Rene Klijn - Mr. Blue
inhoud[20]="S9l1jpVNtT8"; // Lady Gaga - Poker face
inhoud[21]="3rIs2S2WH7M"; // Leona Lewis - Bleeding Love
inhoud[22]="v_kIa79-hkw"; // Rob de Nijs - Banger Hart
inhoud[23]="n63JR13G3AM"; // Son of a preacher man
inhoud[24]="cqrFmI8PLjI"; // Tina turner - Proud mary
inhoud[25]="VS0CV_GWEMI"; // Train - Drops of Jupiter
inhoud[26]="ZaJ_ub9ps58"; // Sorry seems to be the hardest word - Elton John
inhoud[27]="2OJsYwLs7yE"; // Stevie wonder - superstition
inhoud[28]="IwuO2dfqrF4"; // This is a mans world - James Brown
inhoud[29]="w7y19ED6Vrk"; // Kiss from a rose - Seal
inhoud[30]="75sx7U6dAB4"; // Michael Jackson - Billie Jean
inhoud[31]="Pid0nCrsQxM"; // Hallelujah - Jeff Buckley
inhoud[32]="NIISMSmRzhQ"; // All stars - Groen als gras
inhoud[33]="yayMuZxlttc"; // Lange frans Baas B - Het land van...
inhoud[34]="xw6bbTxbTds"; // Guns n roses - knockin on heavens door
inhoud[35]="J8vZUqxlW88"; // Mariah Carey - without you
inhoud[36]="CTTjLxXFg0k"; // Kelly Clarkson - Because of you
inhoud[37]="DiakgTPLCiA"; // Guus Meeuwis - Geef mij je angst
inhoud[38]="hLi3MhzxcPk"; // Elvis Presley - Return to sender
inhoud[39]="je9kxGsp1pU"; // Elvis Presley - Jailhouse rock
inhoud[40]="rXRExocnpUw"; // The Rolling Stones - Angie
inhoud[41]="5syWadigU5g"; // Shakira - Whenever, wherever
inhoud[41]="OZgNQwxxz2M"; // Andre hazes - Zij gelooft in mij
inhoud[42]="rfUYuIVbFg0"; // Journey - Dont stop believing
inhoud[43]="y62OlGvC-bk"; // ABBA - Dancing Queen
inhoud[44]="BXRa8u8Uk5U"; // ABBA - Mammia mia
inhoud[45]="LLVHlgheJ_8"; // Dont stop me now - Queen
inhoud[46]="eyvV217h1xM"; // Abel - Onderweg
inhoud[47]="8uG-CuH0o-4"; // Anouk - Three days in a row
inhoud[48]="zYynkgJi1s4"; // Artiesten voor azie - Als je iets kan doen
inhoud[49]="02VxUR-v7Yw"; // Atomic kitten - Eternal flame
inhoud[50]="TCeD_6Y3GQc"; // Beach boys - Good vibrations
inhoud[51]="JywK_5bT8z0"; // Sugar sugar - The archies
inhoud[52]="3WkXPPLiZOY"; // Beyonce - If i were a boy
inhoud[53]="uSD4vsh1zDA"; // Black eyed peas - I gotta feeling
inhoud[54]="lmVubP60rxA"; // Marco Borsato & Sita - Lopen op het water
inhoud[55]="K2Z5EF1NN1c"; // Do - Heaven
inhoud[56]="XfuBREMXxts"; // The monkeys - Im a believer
inhoud[57]="HdXPQiukoYE"; // Alice, who the fuck
inhoud[58]="jGLsAkeRd84"; // 10cc - Dreadlock holiday
inhoud[59]="MeG-hNXXy6I"; // Down under - Men at work
inhoud[60]="0rlB_q6lJ5A"; // Pretty woman - Roy orbison
inhoud[61]="VF6JMotbHYM"; // wonderful world - sam cooke
inhoud[62]="rmWPk6qLAiE"; // How do you do - Mouth Macneal
inhoud[63]="iEshQf-tCJE"; // Righteous Brothers - Unchained Melody
inhoud[64]="E6C2-5ZsuaY"; // Angels - Robbie Williams
inhoud[65]="5_-XychEyz8"; // Feel - Robbie Williams
inhoud[66]="eHQG6-DojVw"; // Katie Melua - 9 million bycicles
inhoud[67]="3FRKEURwL4A"; // Eminem - Lose yourself
inhoud[68]="-iJk9vWzBqc"; // Manfred Mann - Dowaah diddy
inhoud[69]="BpbCPjWDEjw"; // you sexy thing - Hot chocolate
inhoud[70]="L4XEbwyvxPc"; // raindrops keep falling on my head
inhoud[71]="kE0pwJ5PMDg"; // Loving you - Minnie riperton
inhoud[72]="HFv6aQNnmzc"; // Meja - all about the money
inhoud[73]="Nm-1xvWibt0"; // Alanis morisette - ironic
inhoud[74]="5AfTl5Vg73A"; // Kaoma - Lambada
inhoud[75]="E2JyrGV7p9g"; //The Caesars - Jerk i out
inhoud[76]="P2BAlbxVlQg"; // Please dont stop the music - rihanna
inhoud[77]="fg9pkAYvrSM"; // Ill be there for you - Friends
inhoud[78]="DEsqGOHo0nI"; // Oops i did it again - britney spears
inhoud[79]="He82NBjJqf8"; // Who let the dogs out - Baha men
inhoud[80]="e7fibtRFnLs"; // Independent women - Destinys child
inhoud[81]="B7iqQP3-6x8"; // No one - Alicia keys
inhoud[82]="FhB7jo7b8NI"; // hollaback girl - gwen stefani
inhoud[83]="-qr__UG9As0"; // love song - sara bereilles
inhoud[84]="oTUx2HxdVgo"; // beyonce irreplaceable
inhoud[85]="FP1Liv0qY6A"; // niet of nooit geweest - acda en de munnik
inhoud[86]="5NxBaumftVg"; // Mr Bass Man
inhoud[87]="a_864Y7G4tk"; // Youre the one that i want - grease
inhoud[88]="L6gya6Fzurw"; // Red red wine - UB40
inhoud[89]="VDjlVTQT3UM"; // Kingston Town - UB40
inhoud[90]="MzYdpY_lAes"; // Push the button - Sugababes
inhoud[91]="fjfq0Fr85Yg"; // Lionel Richie - Three times a lady
inhoud[92]="Sd2RlDz1tzY"; // Im a survivor - Destinys child
inhoud[93]="b6t4Zs5Yq_k"; // Tears in Heaven - Eric Clapton
inhoud[94]="kke9kaV9sMU"; // Shout - The isley brothers
inhoud[95]="XpzggAVxLME"; // The beatles - Twist and Shout
inhoud[96]="zYHickVMIP4"; // Mika - Relax, take it easy
inhoud[97]="yb7NNzM-QIY"; // Ik heb je lief - Paul de leeuw
inhoud[98]="tB2Zc_5QSTk"; // umbrella - rihanna
inhoud[99]="WEqJroZSdKA"; // janet jackson - Together again
inhoud[100]="spTXAHvuXa0"; // laura janssen - use somebody
inhoud[101]="FnnmYjMpWf4"; // Malle Babbe - rob de nijs
inhoud[102]="9whehyybLqU"; // 99 luftballons - nena
inhoud[103]="inXC_lab-34"; // Signed Sealed Deliverd - Stevie wonder
inhoud[104]="cl88QEll-Xc"; // Im Yours - Jason Mraz
inhoud[105]="7QEvU3n5axY"; // dokter bernard - bonnie st. claire ron brandsteder
inhoud[106]="bqOwLwhHUqo"; // Wonderful world - Louis Armstrong
inhoud[107]="se9rfWucgeY"; // Pianoman - Billy Joel
inhoud[108]="koJlIGDImiU"; // Hero - Enrique Iglesias
inhoud[109]="_do64Bs0Pls"; // Veldhuis en Kemper - Ik wou dat ik jou was
inhoud[110]="sN62PAKoBfE"; // Macarena - Los del Rio
inhoud[111]="R1Jakp2Bh5k"; // K-Otic - Damn I think I love you
inhoud[112]="9oU_F0yS-Bo"; // Gangstas paradise
inhoud[113]="IwBNY2xqSX8"; // Emilia - Big Big World
inhoud[114]="pN1zt6K3Oo0"; // Eamon- f*** it, I dont want you back
inhoud[115]="a93K1M00cAE"; // It wasnt me
inhoud[116]="snGEq35N_sI"; // i will survive - Hermes House Band
inhoud[117]="w363IFss4is"; // simon - vakkenvuller
inhoud[118]="tnFy1luxL0A"; // Whats Up--4 Non Blondes
inhoud[119]="XfbBEAuARfk"; // Mario - Let me love you
inhoud[120]="gUNsLAV5_c4"; // Kurt Nilsen - Shes so high
inhoud[121]="2K9j4VFtJKI"; // Jamai - Step right up
inhoud[122]="5wgs8SXn4Rs"; // Gareth Gates - Stupid mistake Anyone of us
inhoud[123]="ncNGMiOHTqU"; // Jim - Tell her
inhoud[124]="P8ArnTfORt8"; // Raffaela - Right here right now
inhoud[125]="37WfQcS5-H4"; // Whitney Houston - I will always love you
inhoud[126]="JLuP-4ZEhOE"; // Dance With My Father - Luther Vandross
inhoud[127]="cf45I1ZI__w"; // Survivor - Eye Of The Tiger
inhoud[128]="AM3Cf_eofpo"; // Im leaving on a jet plane - John Denver
inhoud[129]="RhXQAAPALPA"; // Relight My Fire
inhoud[130]="nwxOjr_71z4"; // Fire - The Pointer Sisters
inhoud[131]="g6A6pMO_WKM"; // Pointer Sisters - Im so excited
inhoud[132]="BgSyB5xSo2U"; // Pointer Sisters - Jump
inhoud[133]="QcUnFL1AhPw"; // Beautiful - Christina Aguilera
inhoud[134]="M8PTQj9Wcm8"; // Our House - Madness
inhoud[135]="TtGY4G7II6s"; // Unwritten - Natasha Beddingfield
inhoud[136]="6A2QkgMvTtM"; // Papa was a rolling stone
inhoud[137]="fTtgVSxfr5M"; // Elton John - Can you feel the love tonight
inhoud[138]="hT-uamTL4Iw"; // Fort Minor - Whered you go?
inhoud[139]="oN86d0CdgHQ"; // John Denver - Country roads
inhoud[140]="4b1wt3-zpzQ"; // Little green bag - george baker
inhoud[141]="miwFiefa918"; // Maniac - Flashdance
inhoud[142]="lzKBgXunV5Q"; // My heart will go on - Celione Dion
inhoud[143]="bjnJ6-s1BXM"; // Aisha - Outlandish
inhoud[144]="0iXMk7NFnPA"; // Stand By Me - E King
inhoud[145]="VM0Z75KEd_o"; // John Lennon - Imagine
inhoud[146]="-1l0NYQUGHU"; // John Legend - Ordinairy people
inhoud[147]="5C5twY6f-rU"; // Frank Sinatra - Fly me to the moon
inhoud[148]="F-8_Se1n67Y"; // Frank Sinatra - New york New york
inhoud[149]="n4kpqDF9j6Q"; // Bob Marley - No woman no cry
inhoud[150]="pREHdlbgJLc"; // Sean Paul - Gimme The Light
inhoud[151]="NCkJe1iurjI"; // Doe Maar - Is dit Alles?
inhoud[152]="WeYsTmIzjkw"; // Afroman - Because I Got High
inhoud[153]="NkwJ-g0iJ6w"; // Johnny Nash - I Can See Clearly Now
inhoud[154]="IuwxZSIS__4"; // Eddy Grant-Electric Avenue
inhoud[155]="rcdpiooajjI"; // Michael jackson Beat it
inhoud[156]="CBrWNbjw3RA"; // Michael Jackson - Smooth Criminal
inhoud[157]="wUrqFkR7QlI"; // Michael Jackson - Man in the mirror
inhoud[158]="MQyRJy-EV6c"; // BoyZone-No Matter What
var i;
i = Math.round(Math.random() * 158);
var videoID = inhoud[i];
// Lets Flash from another domain call JavaScript
var params = { allowScriptAccess: "always" };
// The element id of the Flash embed
var atts = { id: "ytPlayer" };
// All of the magic handled by SWFObject (http://code.google.com/p/swfobject/)
swfobject.embedSWF("http://www.youtube.com/v/" + videoID +
"&enablejsapi=1&playerapiid=player1&autoplay=1&rel=0",
"videoDiv", "425", "355", "8", null, null, params, atts);
}
function _run() {
loadPlayer();
}
google.setOnLoadCallback(_run); Alvast bedankt voor jullie hulp!
Gr.
Jos
