darklexus2k9 Posted August 16, 2009 Share Posted August 16, 2009 ok well my last post was deleted for some reason but ok here is wot i need help with i have started my own gaming site and i have created some videos i wont them to play in wmp right now i have image links going to a page with the stream for each video but i will be creating more videos and i don't wont to have to create a new page for every video they will be mms streams i found this on the net <SELECT name=href onchange="sel(this.value);"> <OPTION value="" selected>videos <OPTION value=mms://my straming url >video1 <OPTION value=mms://my streaming url>video2 </OPTION> </SELECT> that gives me a drop down box but i wont it to be images my members click i wont all of my videos to load in wmp on the same page with that code my embedded player looks like this <div id="mus"> <script> function sel(href){ if(href=='') mus.innerHTML=""; else mus.innerHTML="<embed type="application/x-mplayer2" src="+href+" width="531" height="456" showcontrols="1" showstatusbar="1" showdisplay="0" autostart="0">"; } sel(''); </script> </div> i try-ed using this but wen i move the embedded player to were i wont on my template it stops working if any one can help me that wood be grate thanks SHORT VERSION : -------------------- I wont my members to click a image that image will then load a stream in wmp i have more than 1 streaming video so more than 1 image i wont all streams to open on the same page wen the images are clicked coz i don't wont to have to create a new page for every new video i create thanks in advance Link to comment https://forums.phpfreaks.com/topic/170549-need-help-with-web-page-php-noob/ Share on other sites More sharing options...
oni-kun Posted August 16, 2009 Share Posted August 16, 2009 Well you can use something such as AJAX to call 'getvideo.php?vid=this' which would handle the video embed codes, simply echoing them. Then your 'mus' form, could be replaced with the video using JS/AJAX combination which should not be hard at all, and best, you will not even need to have the page to be refreshed to load it up. This isn't a PHP question though, prolly why it was deleted /moved before. ... If you don't want to use AJAX, then do this. <?php if (isset($_GET['vid'])) { $vid = $_GET['vid']; if($vid = 'foo') { echo "<embed wmpclass bla stream=mss://foo/blaa>";} if($vid = 'dog') { echo "<embed wmpclass bla stream=mss://dog/blaaaa>"; } } ?> Lazy example, but works for what you want it.. all on one page.. defined by.. getvideo.php?vid=xxx.. Link to comment https://forums.phpfreaks.com/topic/170549-need-help-with-web-page-php-noob/#findComment-899611 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.