Yes, though I get the following error message. Why is this?
Parse error: syntax error, unexpected T_STRING in C:\Documents and Settings\User\Desktop\Xampp\htdocs\Shrink\Upload.php on line 14
<?php
if (($_FILES["file"]["type"] == "audio/mp3")
|| ($_FILES["file"]["type"] == "audio/x-mpeg"))
{
$f = fopen('$_FILES["file"]["name"]', 'rb');
$trash = fread($f, (386 * 1024 / 8) * $_POST[Start]);
$content = fread($f, (386 * 1024 / 8) * $_POST[Stop]);
echo $content;
$trash = null ;
fclose($f);
$new_file_name = $_FILES["file"]["name"]. "(New)";
[B] $fh = fopen($new_file_name, 'wb') or die('Can't open file');[/B]
fwrite($fh, $content);
fclose($fh);
}
else
{
echo "Invalid file";
echo $_FILES["file"]["type"];
}
?>