Quick and Easy question.
Posted: Tue Mar 08, 2011 4:33 pm
Hi my visitors are tired of having unknown time for their downloads. I think I'm on the right track I'm just having a bit of a problem concatenating I think.
oh ya and it says error on line 7 if that helps
<?php
$filename = 'wisconsin'; //set filename
$hit_count = @file_get_contents('c' .$filename . '.txt'); //concatenate to make "cfilename.txt"
$hit_count++;
(line 7) @file_put_contents(''c' .$filename', $hit_count); // adds 1 count to "cfilename.txt"
header('Content-disposition: attachment; filename="$filename . 'mp3'"'); // tells "filename.mp3"
header('Content-type: audio/mp3');
header('Content-length: '. filesize($filename . '.mp3')); // tells filesize "filename.mp3"
readfile('http://righthere.com/display/sessions/' . $filename . '/' . $filename . '.mp3'); // points to the download file at " 'http://righthere.com/display/sessions/f ... lename.mp3')
?>
Thanks ahead of time. I've just kept on changing it but I still can't get it to run.
oh ya and it says error on line 7 if that helps
<?php
$filename = 'wisconsin'; //set filename
$hit_count = @file_get_contents('c' .$filename . '.txt'); //concatenate to make "cfilename.txt"
$hit_count++;
(line 7) @file_put_contents(''c' .$filename', $hit_count); // adds 1 count to "cfilename.txt"
header('Content-disposition: attachment; filename="$filename . 'mp3'"'); // tells "filename.mp3"
header('Content-type: audio/mp3');
header('Content-length: '. filesize($filename . '.mp3')); // tells filesize "filename.mp3"
readfile('http://righthere.com/display/sessions/' . $filename . '/' . $filename . '.mp3'); // points to the download file at " 'http://righthere.com/display/sessions/f ... lename.mp3')
?>
Thanks ahead of time. I've just kept on changing it but I still can't get it to run.