Go
Not registered? Sign up!

Hide mp3 path with php

Google Translate
5 posts | return to the Setup Problems forum | get the rss feed for this thread

Feb. 22, 2009longtail_user

Hi,

I want to hide my mp3 file path.

I tried this php code but it doesn't work:

myfile.php:
<?php
$audio=array(
'1' => 'file1.mp3',
'2' => 'file2.mp3'
);
readfile ($audio[$_GET['mp3']]);
?>


test.html

...
s1.addParam('flashvars','file="myfile.php?mp3=1');
...

The code works fine with an image but not with an mp3 file.

Do you have some suggestions ?

Thanks

Feb. 22, 2009lefTy


s1.addVariable('file', encodeURIComponent('myfile.php?mp3=1')};
s1.addVariable('type', 'sound');


You may not need the type in the very latest v4.4.x players. In fact, using it may stop the player from instantiating.

Feb. 23, 2009longtail_user

Ok, thanks, i'll try this.
By the way i have the 4.2.90 version, so i hope the player will not stop from instantiating

Feb. 23, 2009longtail_user

Hi lefty,

I have to use s1.addParam for the 4.2.90 version, so i tried your code (with addParam and with addVariable) but both doesn't work.

The code:

test.html

<p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>
<script type="text/javascript">
var s1 = new SWFObject("mediaplayer/player.swf","ply","350","350","7","#ffffff");

s1.addVariable("allowfullscreen","true");
s1.addVariable("allowscriptaccess","always");
s1.addVariable("wmode","opaque");

s1.addVariable("file", encodeURIComponent("myfile.php?mp3=1"));

s1.addVariable("type", "sound");
s1.write("player1");

</script>';

What you think ?

Thanks

Nov. 03, 2009Amit

I want Hide real pathe on my Mp3 ,Zip Files & I want There id & change locatione so pls give me php file

Add a reaction

You can also return to the category or try this search for related threads.


 

Search the Forums

Go

Support

Support Here are some helpful links to learn more about the JW Player™:

Monetize Your Video

Monetize Your Video Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!

Why Buy a License?

Why Buy a License? If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.