#!/usr/bin/php 1 ){ /* (1) Decrement the depth */ $depth--; /* (2) Try to override the secret file */ if( @file_put_contents(SECRET_CONF, "$key:$depth") ) return 0; else return 127; /* [4] If cannot decrement, generate new password =========================================================*/ }else{ // Generate new secret $secret = generate_secret().':999'; // Try to override the secret file if( @file_put_contents(SECRET_CONF, $secret) ) return 0; else return 127; } return 0; } echo cyclichash_decr(); ?>