An Entrepreneur, Coach, IT Consultant, Strategic Adviser, and a Traveler craving to explore and contribute to forming a better society.

Friday, November 28, 2008

Encryption and Decryption in PHP

No comments :
Keywords: PHP, base64, Encode, Decode, Encryption, Decryption, Security

Find below the way you could encrypt and decrypt your strings in PHP:-

<?php

$str = 'This is an encoded string';
echo "Encoded String: ". base64_encode($str);

$str = base64_encode($str);
echo "Decoded String: ". base64_decode($str);

?>



Keywords: PHP, base64, Encode, Decode, Encryption, Decryption, Security

No comments :