i am trying to upload a mp3 file to server using php code as shown.
$audio=basename($_FILES['file']['name']);
$audio=str_replace(' ','|',$audio);
$tmppath1="audios/".$audio;
move_uploaded_file($_FILES['file']['tmp_name'],$tmppath1);
$query="INSERT INTO `appinstaller`.`tbl_audio` (`audioname`) VALUES ('$audio')";
$res=mysql_query($query);
in this file uploaded successfully but uploading to server taking more time.
is there any method to upload MP3 files faster?
Probably not – what you show doesn’t show any obvious bottlenecks. It’s likely just the client connection that takes so long.
What you need to fix though is the SQL injection in
$audio. See http://php.net/manual/en/security.database.sql-injection.php