/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
class TokenProtection { /** * @param string $name * @return string */ public function getToken($name) { { } return $token; } /** * @param string $name * @param string $value * @return bool */ public function isTokenValid($name, $value) { $expectedValue = self::getToken($name); return $value == $expectedValue; } }