note 59430 added to function.base64-encode

From: Date: Tue, 06 Dec 2005 21:53:14 +0000
Subject: note 59430 added to function.base64-encode
Groups: php.notes 
Request: Send a blank email to php-notes+get-99651@lists.php.net to get a copy of this message
If you encode text that contains symbols like < > and want to send it in GET query, be sure to urlencode the result of base64_encode, as it sometimes adds a + (and it's a special symbol) at the end: <?php echo base64_encode('<html>'); ?> returns: PGh0bWw+ A function like this could also be useful: <?php function base64_urlencode($str) { return urlencode(base64_encode($str)); }; ?> ---- Manual Page -- http://www.php.net/manual/en/function.base64-encode.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+59430 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59430&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59430&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59430&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59430&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59430&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59430&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59430&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+59430&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#99651) next »