카카오 로그인을 이용한 가입 테스트

This commit is contained in:
2018-03-10 04:16:17 +09:00
parent e00b763f43
commit 4b1e3e325e
18 changed files with 1179 additions and 0 deletions
+25
View File
@@ -107,3 +107,28 @@ function delExpiredInDir($dir, $t) {
}
function returnJson($value, $noCache = true, $pretty = false, $die = true){
header('Content-Type: application/json');
if($noCache){
header('Expires: Sun, 01 Jan 2014 00:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');
}
if($pretty){
$flag = JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT;
}
else{
$flag = JSON_UNESCAPED_UNICODE;
}
echo json_encode($value, $flag);
if($die){
die();
}
}
function hashPassword($salt, $password){
return hash('sha512', $salt.$password.$salt);
}