Jump to content

testing if an mp3 file exists on server and then playing it


trix.1210

Recommended Posts

I have a record shop written in html and javascript and some php at www.trixysvinyl.com

 

heres the page im working on: http://www.trixysvinyl.com/info1.php?view=tv598

 

heres the php variable:

 

$view="tv598"

 

...which ill read from the URL.

 

I need some php code that looks to see if the following files are in the sf folder on the server

 

tv598a1.mp3

tv598a2.mp3

tv598a3.mp3

tv598b1.mp3

tv598b2.mp3

tv598b3.mp3

 

They will be sound samples ill record and store in the sf folder.

 

I need some php pcode which will look to see if any of these files exist in the sf folder and then display a link to them on the screen. The user then clicks the link and the web page will open up the mp3 in the default mp3 player and play it.

 

I guess Ill need a for..next loop for this.

 

I'm a newbie with php.

 

Any help appreciated - oh - and a free record from my shop under £10 to the 1st person who gives me a successfull solution!!

 

Thanks

 

Trixy

Link to comment
Share on other sites

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.