$member = array
(
'time' => time(),
'username' => $row["UserName"],
'password' => $row["Pwd"],
'email' => $row["Email"]
);
$auth = passport_encrypt(passport_encode($member), $passportkey);
setcookie("auth",$auth,($_POST["Cookie"]? time()+(int)$_POST["Cookie"] :0));
$forward=$_POST['forward'];
if($forward=="")$forward="../../index.php";
$verify = md5('login'.$auth.$forward.$passportkey);
$auth=rawurlencode($auth);
$forward=rawurlencode($forward);
header("Location: bbs/api/passport.php?action=login&auth=$auth&forward=$forward&verify=$verify");
以上是楼主说明登入的方式。。
想问。。。如果我不用 header("Location: bbs/api/passport.php?action=login&auth=$auth&forward=$forward&verify=$verify"); 而改用curl的方式把资料传过去discuz的api,可以操作的吗? |