Skip to content

Instantly share code, notes, and snippets.

View MohammadAlBanna's full-sized avatar
🏠
Working from home

Mohammed AlBanna MohammadAlBanna

🏠
Working from home
View GitHub Profile
anon true, if the space may be omitted in anonymous function declarations
bitwise true, if bitwise operators should be allowed
browser true, if the standard browser globals should be predefined
cap true, if upper case HTML should be allowed
continue true, if the continuation statement should be tolerated
css true, if CSS workarounds should be tolerated
debug true, if debugger statements should be allowed
devel true, if logging should be allowed (console, alert, etc.)
eqeq true, if == should be allowed
es5 true, if ES5 syntax should be allowed
<?php
class csrf {
public function get_token_id() {
if(isset($_SESSION['token_id'])) {
return $_SESSION['token_id'];
} else {
$token_id = $this->random(10);
$_SESSION['token_id'] = $token_id;
return $token_id;