Input_string is the string you would like to encrypt, and salt is an optional parameter that influences how the encryption will work. By default PHP uses a two character DES salt string, however if your system standard is MD5, a 12-character salt string is used.
This is most frequently used for handling passwords from the browser to the server.
<?php
$encrypt = crypt('TextToEncrypt');
print $encrypt . is the encrypted version of TextToEncrypt;
?>
With Salt:
<?php
$encrypt = crypt('TextToEncrypt' , 'd4');
print $encrypt . " is the CRYPT_STD_DES version of TextToEncrypt";
?>
For more information please read this article on using the crypt () function.

