I have a php function that generates a rollingkey for a webAPI to download a xml file, this is literally the only reason i have PHP installed on my server and if it could be converted to bash id be able to uninstall php, could anyone assist?
<?php
function generateKey(String $password)
{
$date = time();
$key = ( date( 'd', $date ) * 2 ) + ( date( 'm', $date) * 100 * 3 ) + ( date( 'y', $date ) * 10000 * 17 );
return md5( $key . $password );
}
print generateKey('abcd1234');
php filename.phpbut you'd have to replace the "print" with "echo"