#1 2012-09-26 06:17:23

profh
Member
Registered: 2010-07-02
Posts: 159

how to parse post data which includes "&" as content?

using IE browser to post data to my server, i get a post data in Variable "InContent" as follow:

var1=value1&var2=a.php?varphp1=valuephp1&varphp2=valuephp2&var3=value3

the result i parsed as follow:

var1 = value1
var2 = a.php?varphp1=valuephp1
varphp2 = valuephp2
var3 = value3

but what i really need is:

var1 = value1
var2 = a.php?varphp1=valuephp1&varphp2=valuephp2
var3 = value3

the apache server can parse it correctly.
what should i do, thanks.

Offline

#2 2012-09-26 06:47:12

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,206
Website

Re: how to parse post data which includes "&" as content?

How do you know it should not be parsed as:

var1=value1
var2=a.php?varphp1=valuephp1&varphp2=valuephp2&var3=value3

I suspect InContent is not exactly like this, but has some escaped chars.

Offline

#3 2012-09-26 06:55:58

profh
Member
Registered: 2010-07-02
Posts: 159

Re: how to parse post data which includes "&" as content?

i parsed it using "&" as Delimiter,so i got the result as follow:

var1 = value1
var2 = a.php?varphp1=valuephp1
varphp2 = valuephp2
var3 = value3

but it is not what i need.

Last edited by profh (2012-09-26 06:56:31)

Offline

#4 2012-09-26 07:09:50

profh
Member
Registered: 2010-07-02
Posts: 159

Re: how to parse post data which includes "&" as content?

sorry,i made a mistake.

i should parse the post data before call urldecode.

thanks, ab.

Offline

Board footer

Powered by FluxBB