Page 1 of 1
How to retrieve url encoded data?
Posted: Thu May 18, 2006 5:31 am
by liverock
Hi
I received a posted data from another server and it look like this:
Code: Select all
FLcWCln8H2aXp7svz8+SqFzMEcjj9EvvQrha9WAcSVocLPNMndzQlR581JaqSJG2+NuY0OrcXrlL
How do make it into readable format?
Thanks!
Posted: Thu May 18, 2006 5:34 am
by Benjamin
What is it?
Posted: Thu May 18, 2006 5:40 am
by liverock
I need to retrieve the data from a server which post data to me.
When I do this
Code: Select all
$input = implode("\r\n", file('php://input'));
the content of $input is
Code: Select all
FLcWCln8H2aXp7svz8+SqFzMEcjj9EvvQrha9WAcSVocLPNMndzQlR581JaqSJG2+NuY0OrcXrlL
plus other junk.
I tried urldecode, rawurldecode, base64decode and all failed.
HELP!
Posted: Thu May 18, 2006 5:40 am
by shiznatix
there are different types of encryption used. take a look at the following:
base64_decode();
uncrypt();
rawurldecode(); <-- definatly not this one but it may help you out someday
it might be something else but those are common
edit: i noticed i posted at the same time as you (dang im slow) but try crypt, might be your ticket
Posted: Thu May 18, 2006 6:19 am
by liverock
Thanks, shiznatix, but none worked.
Just asking, what is the right way to retrieve the data posted from another server?
Is it:
Code: Select all
$input = implode("\r\n", file('php://input'));
or something else?
Thanks!
Posted: Thu May 18, 2006 7:12 am
by Chris Corbyn
liverock wrote:Thanks, shiznatix, but none worked.
Just asking, what is the right way to retrieve the data posted from another server?
Is it:
Code: Select all
$input = implode("\r\n", file('php://input'));
or something else?
Thanks!
No. $_POST is an array that contains posted data.... you access it from there.
Code: Select all
echo $_POST['form_field_name_here'];
Posted: Thu May 18, 2006 7:37 am
by liverock
but the server send me a FILE.
How do i access it with
Code: Select all
echo $_POST['form_field_name_here'];