basically i want to some how have a webplayer.php and a options menu. on default it will load a flash player but if they put in the options they can set which player they want whether its wmp, flash, etc, etc and whether it auto starts. how would i do this?
Well it depends. Is the flash player going to take options from the address as well? If so, you have to make sure you code the actionscript to coincide with the PHP script. That confusion aside, you could use a switch for a given variable in the URL. Try something like this: <?php // For sake of example, I'll just use a define for the codes right now.. define("FLASH_PLAYER_CODE","Whatever the code is for the flash player should go here!"); define("WM_PLAYER_CODE","WM Player code goes here!"); // Let's use a switch to determine what we're doing! switch(strtolower($_GET['player'])){ default: // This will be the flash player. If the var is unset, set to ?player=flash, or unknown this will be used print FLASH_PLAYER_CODE; break; case 'wmp': print WM_PLAYER_CODE; break; case 'whateverelse': // Code break; case 'andsoon': // Code break; } ?> PHP: Note that this can be set in the middle of the page. So anything that would look the same regardless of the player type can be set only one time, then run this code to simply change the player! I hope the concept makes sense Side-note: The way this player will work is webplayer.php?player=DEFINED_PLAYER. DEFINED_PLAYER only needs to be defined as a case '': break; in order to function properly. Good luck. Regards, Dennis M.
I already have done this but I am looking to make some sort of panel so they can set like the default one they want to use and set default parameters like auto-start, etc? I assume that's done with php and cookies but never done it before.
also how can i make it so if it was like player.php?player=wmp&quality=high it would use a different source?