It is necessary to insert text at the end of the name of the file being downloaded (before the extension), for example. (site.ru). The extension is always just mp3.
So
track (site.ru) .mp3
Piece of code
class download { var $properties = array ('old_name' => "", 'new_name' => "", 'type' => "", 'size' => "", 'resume' => "", 'max_speed' => "" ); var $range = 0; function download($path, $name = "", $resume = 0, $max_speed = 0) { $name = ($name == "") ? substr( strrchr( "/" . $path, "/" ), 1 ) : $name; $name = explode( "/", $name ); $name = end( $name ); $type = explode( ".", $name ); $type = strtolower( end( $type ) ); Here
$ path is the name on the server
$ name is the name that is written to the file and which needs to be changed. It is now track.mp3 , but you need so track (site.ru) . Mp3 .
Tried to add after $ name = end ($ name); to just remove .mp3
$name = preg_replace("/.*?\./", '', $name); but it remains the other way around.
preg_replace("/(.*)\.mp3$/", "$1(site.ru).mp3", $fname)- teran