/    Sign up×
Community /Pin to ProfileBookmark

PHP and EMBEDDED WMP

Hi could really use a hand, I got my WMP playing on both IE and Firefox and the randomize works its just once the first song is done it end completely. here is what i have. So basicly what im asking is how to put a loop into this PHP that will play them all continuesly and shuffles them all untill you close leave that site.

Sorry for the Dupe Post.

**************PHP*****************
<?php

$url[0] = “http://www.example.com/music/example.mp3“;
$url[1] = “http://www.example.com/music/example.mp3“;
$url[2] = “http://www.example.com/music/example.mp3“;
$url[3] = “http://www.example.com/music/Oexample.mp3“;

srand ((double)microtime()*1000000);
$randomnum = rand(0, count($url)-1);
header (“Location: $url[$randomnum]”);
?>

*************HTML WMP EMBED***************
<OBJECT ID=”embedded_player” height=”45″ width=”180″ classid=”CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95″ CODEBASE=”http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715” standby=”Loading Microsoft Windows Media Player components…” type=”application/x-oleobject” VIEWASTEXT>
<PARAM name=”FileName” value=”http://example.com/randome.php” />
<param name=”AutoStart” value=”True”>
<param name=”ShowStatusBar” value=”False”>
<param name=”ShowPositionControls” value=”0″>
<param name=”Loop” value=”True”>
<embed name=”wmplayer” TYPE=”application/x-mplayer2″
pluginspace=”http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&”

FileName=”http://example.com/randome.php
Width=”180″
Height=”45″
ShowPositionControls=”0″
ShowStatusBar = “False”
Loop=”True”
</embed>
</OBJECT>

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @Waifthe3rd spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.13,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...