PHP Classes

File: ajax_token.php

Recommend this page to a friend!
  Packages of MD.Shoeb Lincoln   Anti CSRF   ajax_token.php   Download  
File: ajax_token.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Anti CSRF
Generate and validate one-time use CSRF tokens
Author: By
Last change:
Date: 20 days ago
Size: 162 bytes
 

Contents

Class file image Download
<?php
require_once 'classes/AntiCSRF.php';
$csrf = new AntiCSRF();
header('Content-Type: application/json');
echo
json_encode(['token' => $csrf->generate()]);