
08/09/2010, 10:43
|
| | Fecha de Ingreso: septiembre-2010
Mensajes: 13
Antigedad: 14 aos, 6 meses Puntos: 0 | |
"header" para descargar mp3 Hola foreros.
Tengo un problemilla y espero puedan ayudarme. Agradezco la colaboracin de antemano.
El caso es que necesito descargar canciones mp3 y que cada descarga se contabilice en un contador. Lo he programado pero a la hora de abrir la cancin no se abre el reproductor de audio sino que muestra los caracteres del archivo y da errores.
este es el codigo de las header dentro de contador.php
$path_a_tu_doc="../FileUpload/archivos/";
$enlace = $path_a_tu_doc."/".$archivo;
header ("Content-Disposition: attachment; filename=".$_GET["archivo"]); /*linea17*/
header ("Content-Type: application/mp3");/*linea18*/
header ("Content-Length: ".filesize($enlace));/*linea19*/
readfile($enlace);
el error que da es este:
Warning: Cannot modify header information - headers already sent by (output started at /home/johnsto2/public_html/audio-video/audio-video-contador.php:1) in /home/johnsto2/public_html/audio-video/audio-video-contador.php on line 17
Warning: Cannot modify header information - headers already sent by (output started at /home/johnsto2/public_html/audio-video/audio-video-contador.php:1) in /home/johnsto2/public_html/j-music.es/audio-video/audio-video-contador.php on line 18
Warning: Cannot modify header information - headers already sent by (output started at /home/johnsto2/public_html/audio-video/audio-video-contador.php:1) in /home/johnsto2/public_html/j-music.es/audio-video/audio-video-contador.php on line 19
ID3TSSE Lavf52.39.0di 4LAME3UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU.98UUUUU di 4 6A@ 4P@ ' $ d @(ad PI'@$ # @:0P('# :JdtbLV+o*\6+'ٮFp6#+Xdi 4.N1X䀀mIhD mHPHFO @\&@H
saben cual puede ser el error? |