How to retrieve url encoded data?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
liverock
Forum Newbie
Posts: 7
Joined: Wed May 17, 2006 3:44 am

How to retrieve url encoded data?

Post 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!
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

What is it?
liverock
Forum Newbie
Posts: 7
Joined: Wed May 17, 2006 3:44 am

Post 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!
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post 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
liverock
Forum Newbie
Posts: 7
Joined: Wed May 17, 2006 3:44 am

Post 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!
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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'];
liverock
Forum Newbie
Posts: 7
Joined: Wed May 17, 2006 3:44 am

Post by liverock »

but the server send me a FILE.
How do i access it with

Code: Select all

echo $_POST['form_field_name_here'];
Post Reply