2016-12-07 98 views

回答

0

你是說你不希望他們在地址欄中看到令牌嗎?

你可以做的是在confirm.php中,如果它作爲一個GET請求進來,重新發回給confirm.php作爲POST。它不僅會在地址欄中顯示最初,然後當它被加工

因此,像這樣

<?php 

if (isset($_GET["data"]){ 
$url = 'https://domain.com/folder/login/confirm.php'; 
$data = array('data' => $_GET["data"]); 



// use key 'http' even if you send the request to https://... 
$options = array(
    'http' => array(
     'header' => "Content-type: application/x-www-form-urlencoded\r\n", 
     'method' => 'POST', 
     'content' => http_build_query($data) 
    ) 
); 
$context = stream_context_create($options); 

} else { 

// if it's not set then you continue processing 

} 
?>