我在php中有一个包含类似
的链接的标题<?php
header("Location: "."https://abc.com/ppp/purchase.do?version=3.0&".
"merchant_id=<23255>&merchant_site_id<21312>&total_amount=<69.99>&".
"currency=<USD>&item_name_1=<incidentsupporttier1>&item_amount_1=<1>&".
"time_stamp=<2010-06-14.14:34:33>&**checksum=<calculated_checksum>**");
?>
当我运行此页面时,计算校验和的值并打开链接
现在如何计算校验和? calculated_checksum = MD5(ABC);
md5是一种算法,它根据括号内的某些值计算校验和的值。
现在我想知道如何在标题网址
中传递校验和的值答案 0 :(得分:0)
我不确定这是不是你的意思:
$calculated_checksum=md5('abc');
header('Location: https://...&checksum=' . $calculated_checksum);
变量必须以$
开头。
答案 1 :(得分:0)
<?php
$cs = md5("abc"); //Puts 900150983cd24fb0d6963f7d28e17f72 (the hash of abc) into the variable named $cd
header("Location: "."https://abc.com/ppp/purchase.do?version=3.0&".
"merchant_id=<23255>&merchant_site_id<21312>&total_amount=<69.99>&".
"currency=<USD>&item_name_1=<incidentsupporttier1>&item_amount_1=<1>&".
"time_stamp=<2010-06-14.14:34:33>&**checksum=" . $cs . "**"); //Redirect the page to the new page with the checksum concatenated onto the end
?>
那是你在找什么?