/** * PHP function to close the session * * @private */ function oos_session_close() { if (STORE_SESSIONS != '1') { if (function_exists('session_close')) { return session_close(); } } }
function _set_session_close_() { if (function_exists("session_close")) { return session_close(); } else { return session_write_close(); } }
function tep_session_close() { if (PHP_VERSION >= '4.0.4') { return session_write_close(); } elseif (function_exists('session_close')) { return session_close(); } }
function zen_session_close() { if (function_exists('session_close')) { return session_close(); } }
<?php /*Login verfication for website*/ ini_set('display_errors', 1); session_start(); if (isset($_POST['user'])) { $user = htmlspecialchars($_POST['user']); } if (isset($_POST['password'])) { $password = htmlspecialchars($_POST['password']); } if (isset($user) && isset($password)) { $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => 'http://web.engr.oregonstate.edu/~pfisterl/cs419/token.php', CURLOPT_POST => 1, CURLOPT_POSTFIELDS => array(grant_type => 'client_credentials'), CURLOPT_RETURNTRANSFER => 1, CURLOPT_USERPWD => "{$user}:{$password}")); $resp = curl_exec($curl); $resp = json_decode($resp); $access_token = $resp->{'access_token'}; /*Store token in session*/ $_SESSION['token'] = $access_token; curl_close($curl); } else { http_response_code(404); exit(1); } session_close(); exit;
function tep_session_close() { // >>> BEGIN REGISTER_GLOBALS // Work-around to allow disabling of register_gloabls - unmap all defined // session variables if (count($_SESSION)) { $session_keys = array_keys($_SESSION); foreach ($session_keys as $variable) { link_session_variable($variable, false); } } if (function_exists('session_close')) { session_close(); } // <<< END REGSTER_GLOBALS }
/** * * @copyright 2010-2015 izend.org * @version 4 * @link http://www.izend.org */ function session_reopen($name = false) { session_close(); session_open($name); }