I tried to costumize the filename in php and transfer it via ssh, unfortently my code not work with uniqe filenames.
$con = ssh2_connect('142.132.165.XXX', 22);
ssh2_auth_password($con, 'root', 'XXXX');
$filename = uniqid('timetrac', true) . '.sql';
echo $filename;
$rd = '/root/ficken/';
$lf = 'timetrac.sql';
$bname = $finfo->getBasename($filename);
$sftp = ssh2_sftp($con);
ssh2_scp_send($con, $lf, '/root/test/'&$filename);
How I can costumize the filename?