Created
July 3, 2012 18:22
-
-
Save wescleymatos/3041569 to your computer and use it in GitHub Desktop.
gerador de nomes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function filenameGenerator($file){ | |
preg_match("/(\w{3,4})$/i", $file, $matchs); | |
return sha1($file.date('YmdHis', time())).".".$matchs[1]; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uma função PHP bacana para gerar nomes de arquivos únicos! Recentemente, trabalhei em um projeto no qual precisava gerar nomes aleatórios para fontes e recursos de design. Se alguém procura uma ferramenta online gratuita para explorar diferentes estilos de fonte para seus projetos, talvez queira dar uma olhada no fontes de letras. Ele oferece uma variedade de geradores de fontes interessantes.