Home  |  Linux  | Mysql  | PHP  | XML
From:George Langley Date:Thu Mar 11 21:57:02 2010
Subject:$_GET is Mangling Base64 value
Hi all. Is there an issue with $_GET not handling a Base64-encoded value correctly? (PHP is 5.1.6)
Am receiving a Base64-encoded value:

theurl.com/index.php?message=xxxxx


echo $_GET["message"];

xxxxx is a Japanese phrase, that has been encoded into Base64. So is using the + symbol:

...OODq+OCou...

but my $_GET is replacing the + with a space:

...OODq OCou...

s marks on my Mac).

earing. My test URL is 230 characters in total, less than the "old" 256 limit.
All I can find online is a reference that PHP will no longer assume that a space is a +:

<http://ca3.php.net/manual/en/function.base64-decode.php#69298>

but my problem is the opposite - the + symbols are there, but the GET is removing them.
(And to add a wrinkle, this then goes into a Joomla! page, whose getVar() command completely removes the +, so I couldn't even do a string replace, as I don't know where the + should have been!)

Tired of looking at the dark red spot on the wall! Thanks.





Navigate in group php.general at sever news.php.net
Previous Next


Your recent visits
Re: [PHP] $_GET is Mangling Base64 value
Re: [PHP] $_GET is Mangling Base64 value
Re: [PHP] Spreadsheet_Excel_Reader problem
Re: [PHP] Re: PHP in HTML code
Re: Warning?



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants