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
liverock
Forum Newbie
Posts: 7 Joined: Wed May 17, 2006 3:44 am
Post
by liverock » Thu May 18, 2006 5:31 am
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!
Benjamin
Site Administrator
Posts: 6935 Joined: Sun May 19, 2002 10:24 pm
Post
by Benjamin » Thu May 18, 2006 5:34 am
What is it?
liverock
Forum Newbie
Posts: 7 Joined: Wed May 17, 2006 3:44 am
Post
by liverock » Thu May 18, 2006 5:40 am
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!
shiznatix
DevNet Master
Posts: 2745 Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:
Post
by shiznatix » Thu May 18, 2006 5:40 am
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 » Thu May 18, 2006 6:19 am
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!
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Thu May 18, 2006 7:12 am
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 » Thu May 18, 2006 7:37 am
but the server send me a FILE.
How do i access it with
Code: Select all
echo $_POST['form_field_name_here'];