Jump to content

probllems whith mime type


nadeemshafi9

Recommended Posts

hi

i am uploading audio to a db and reproducing it whith an embed php file whith a mime type content type

so far i hav been able to work with wma files fine. i can reproduce them with embed and my script using the audio basic mime type.

i need to work with wav files, the problem is i tred all the wav mime types like audio/wav, audio/x-wav and all that but what happens is my empeded player comes up on the page but has no sound the data is comming throgh i am sure i can print it.

here is the embeded file im using

get_audio.php
[code]<?php
header("Content-type: audio/x-wav");

include("db_con.php");

$sql = "SELECT audio FROM audio WHERE id='".$_GET["id"]."';";
$result = mysql_query($sql, $conn);
$row = mysql_fetch_array($result);
$audio = $row["audio"];
echo $audio;
?>[/code]

it goes in to the <embed src=get_audio.php?id=21> etc.

so it works with wma files but wav files seem to just produce an embeded player with no sound.

thanx for any help
Link to comment
Share on other sites

correct format tested with all audio files good luck

[code]


<?php

$music_query="SELECT * from members_music_uploads where id='$id'";
$music_result=mysql_query($music_query);

while($mus=mysql_fetch_assoc($music_result)) {


$music_link="<embed src='members_music/".$mus["userfile_name"]."'  bgcolor='#A0C0F0' width='125' height='125' autostart='false' loop='false' >";
}

?>
[/code]
Link to comment
Share on other sites

well thats not exactly what i was looking for. your working with paths, im trying to embed the data in to a file and then ebed that with an embed tag, it works fine, but i cant seem to mimic the wav file correctly or the player is not taking it in, it is working fine with wma.  im looking for somone who might be able to see an error or know of possible causes.

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