01c11-1.php
来自「介绍PHP5的给类型函数应用」· PHP 代码 · 共 15 行
PHP
15 行
<?php// A function to return a unique identifier for the user's browserfunction create_unique() { // Read the user agent, IP address, current time, and a random number: $data = $_SERVER['HTTP_USER_AGENT'] . $_SERVER['REMOTE_ADDR'] . time() . rand(); // Return this value hashed via sha1 return sha1($data);}// Echo out the hashed data - This will be different every time.$newhash = create_unique();echo "<pre>{$newhash}</pre>";?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?