开发者

Pass encrypted querystring between php and asp.net (c#)

开发者 https://www.devze.com 2022-12-23 10:21 出处:网络
I need to pass a single variable in a querystring from one application (in PHP) to another (in ASP.NET).It\'s a one way transfer...That is I need to encrypt it in PHP and decrypt it in ASP.NET (c#).

I need to pass a single variable in a querystring from one application (in PHP) to another (in ASP.NET). It's a one way transfer...That is I need to encrypt it in PHP and decrypt it in ASP.NET (c#).

I'm barely a newbie on PHP and I'd like not to have to do more than add a tag to the page that needs to do the passing.

The data will be anywhere from 5 - 15 character开发者_C百科s..only letters and numbers.

Thanks!


How about something like this?

<?
$query_string = base64_encode($_SERVER["QUERY_STRING"]);

header("location: http://www.domain.com/page.aspx?query_string=$query_string");

//rest of php code...
?>

Then in page.aspx you decode that query string

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号