Re: how do people do this?
Most likely, using HTML and javascript.
Embed the Windows Media Player object onto your page, and using javascript or vbscript, set the .URL property to the value specified in the querystring.
Re: how do people do this?
yeah but how can i do that?
Re: how do people do this?
Re: how do people do this?
i know how to embed controls into webpages but how can i make it change the url to what ever is after the "?wmpurl=" tag in the url?
Re: how do people do this?
Did you see the VBScript on that page?
Re: how do people do this?
you can't view the source code for the launch.yahoo player
Re: how do people do this?
HTML Code:
<html>
<head>
<title>Music Player</title>
<script type = "text/javascript">
function playSong(strURL){
Player.url = strURL;
}
function stopSong(){
Player.controls.stop();
}
</script>
</head>
<body>
<object id="Player" width="0" height="0"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
</object>
<form id = "frmPlayer">
<input type = "text" id = "txtURL" />
<input type = "button" id = "cmdPlay" value = "Play" onclick = "playSong(txtURL.value);"/>
<input type = "button" id = "cmdStop" value = "Stop" onclick = "stopSong();" />
</form>
</body>
</html>
Re: how do people do this?
i cant get your code to work.
Re: how do people do this?
A little elaboration on that would be helpful.
Re: how do people do this?
It won't run in Firefox/Mozilla and IE with XP2 will block the Active X file.
Re: how do people do this?
what i mean is to have a webpage that looks the same on every file and the path of it tells it what file to play. i do not want the user to be able to change the path. i am learning php so can this be done in php?
something like http://www.dws05.ath.cx/somepage.php...=/somefile.wma
ps. move this thread if you want to the php forum but i only just started to learn php.
Re: how do people do this?
i have learnt most of php and i have made my own little script in php.
it is two files. one is a html form and the other is a dynamic php file.
this is the html file:
HTML Code:
<html>
<head>
<title>Dan's Web Server 2005!</title>
</head>
<body>
<form action="mp.php" method="POST">
<input type="text" name="name" />
<input type="submit" />
</form>
</body>
</html>
this is the php file:
PHP Code:
<?
$URL = $_POST["name"];
print
'<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Dans Web Server 2005!</title>
</head>
<body>
<p>
<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="WindowsMediaPlayer1" width="245" height="240">
<param name="URL" value=' . $URL . '>
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="defaultFrame" value>
<param name="playCount" value="1">
<param name="autoStart" value="-1">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="baseURL" value>
<param name="volume" value="50">
<param name="mute" value="0">
<param name="uiMode" value="full">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="0">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="-1">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value>
<param name="SAMILang" value>
<param name="SAMIFilename" value>
<param name="captioningID" value>
<param name="enableErrorDialogs" value="0">
<param name="_cx" value="6482">
<param name="_cy" value="6350">
</object>
</p>
<p>You are now playing ' . $URL . '.<br>You are connected to Dans Web Server 2005! on the host name <a href="http://'. $_SERVER['HTTP_HOST'] . '">' . $_SERVER['HTTP_HOST'] . '</a> ' . '</p>
</body>
</html>'
?>
the code seems to work fine on my server (http://www.dwsn.ath.cx/dev/mp.php)