PHP/Login Authentication/md5

Материал из Web эксперт
Перейти к: навигация, поиск

Get uniqid

   <source lang="html4strict">

<? $id = uniqid("phpuser"); echo "$id"; ?>

      </source>
   
  


md5 and uniqid

   <source lang="html4strict">

<? $id = md5(uniqid(rand())); echo "$id"; ?>

      </source>
   
  


Use md5 function to encrypt text

   <source lang="html4strict">

<?php

  $val = "secret";
  echo "Pre-hash string: $val 
"; $hash_val = md5 ($val); echo "Hashed outcome: $hash_val";

?>


      </source>