Gerar chave de verificação

Função para gerar uma chave de verificação de diferentes tamanhos, muito usado para envio de código de segurança em emails e/ou geração de codigos captcha para validação de envio de mensagem.

<?php 

function gerar_chave($tamanho){
  
$car "23456789ABCDEFGHIJKMNPQRSTUVWXYZ";
  for (
$i=0$i $tamanho$i++) {
    
$key .= $car{rand(0strlen($car) - 1)};
  }
  return 
$key;
};
//Ex.:  gerar_chave(10);
//retorno   CDIJ89KMNP
?>
Postado Por Thomas Jefferson em 12/08/2011 08:56:37
Visualizações 282353 | Comentários 9

Comentários

  • Merziuziy em 29/06/2021 03:33:00

    IpblKa s://xnxxx.web.fc2.com/ xnxx

  • Merziuziy em 29/06/2021 07:39:48

    6saR7C s://xnxxx.web.fc2.com/ xnxx

  • johnanz em 22/07/2021 18:26:15

    write my essays writemyessayforme.web.fc2.com

  • johnansog em 22/07/2021 19:48:35

    write my essays writemypaper.online

  • Alonso em 12/08/2021 01:01:51

    An estate agents ://porntubereview.online redtube That did not satisfy some EU solar manufacturers who saidthe minimum import price agreed still constitutes dumping andaccused the European Commission of breaking EU law by failing toprotect European industry.

  • Lioncool em 12/08/2021 01:01:51

    Incorrect PIN ://xnxxrating.online toroporno "They have nothing to do with commemorating internment or political struggle. At the same time there are a number of young people who do collect wood for these bonfires that are not involved with the more sinister criminal elements."

  • Abraham em 12/08/2021 01:01:52

    Not available at the moment ://tuberating.online spankwire To supplement the additional funding the district has requested the city and state, officials have asked teachers unions to agree to more than $130 million in concessions, including wage reductions, higher health care costs and increased workdays.

  • Brendan em 12/08/2021 01:01:52

    I can't get through at the moment ://tubereviews.online porntube The brick-built privy that nestles beneath a yew tree in our garden became redundant many years ago when indoor sanitation was fitted. It is now being transformed inside into a shell-covered grotto – albeit at a very slow rate.

  • Derrick em 12/08/2021 01:01:54

    I've got a very weak signal ://tuberating.online 9taxi The dollar volume of fraudulent refunds is not known, according to the GAO. Financial institutions recognized and returned to the IRS $754 million in tax refunds they found suspicious between January and Sept. 30, 2012. The GAO said that figure is only a fraction of the total amount of refund fraud.

Deixe seu comentário

Todos os comentários estão sujeitos à moderação