Jump to content

Recommended Posts

ok well my last post was deleted for some reason  :wtf:

 

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 :thumb-up:

 

Link to comment
https://forums.phpfreaks.com/topic/170549-need-help-with-web-page-php-noob/
Share on other sites

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..

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.