Biner php ke base64

<?php
$str = 'I am some string';
echo base64_encode($str);
Ahmed