Jump to content


Photo

probllems whith mime type


  • Please log in to reply
4 replies to this topic

#1 nadeemshafi9

nadeemshafi9
  • Members
  • PipPipPip
  • Advanced Member
  • 1,245 posts
  • LocationUK

Posted 03 September 2006 - 06:37 PM

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
<?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;
?>

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
DONT LAY AN EGG OVER IT

#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 03 September 2006 - 06:51 PM

correct format tested with all audio files good luck



<?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' >";
}

?>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 nadeemshafi9

nadeemshafi9
  • Members
  • PipPipPip
  • Advanced Member
  • 1,245 posts
  • LocationUK

Posted 03 September 2006 - 07:59 PM

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.
DONT LAY AN EGG OVER IT

#4 nadeemshafi9

nadeemshafi9
  • Members
  • PipPipPip
  • Advanced Member
  • 1,245 posts
  • LocationUK

Posted 03 September 2006 - 08:00 PM

iv tried using the audio/wav mime type and audio/x-wav and the opthers but wavs just produce dead players
DONT LAY AN EGG OVER IT

#5 nadeemshafi9

nadeemshafi9
  • Members
  • PipPipPip
  • Advanced Member
  • 1,245 posts
  • LocationUK

Posted 03 September 2006 - 08:02 PM

wma files work with audio/basic
DONT LAY AN EGG OVER IT




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users