(ã¤ãããã) 1. é©å½ã«requireããã require 'easy_csrf.php'; 2. é©å½ã«session_start()ãã¦ããã session_start(); 3. (HTML) submitã®æåã«æ¬¡ã®ä¸æãããã <input type="hidden" name="<?= EasyCSRF::KEY_NAME ?>" value="<?= EasyCSRF::generate() ?>" /> 4. ãã¼ã¿ãåãåãç®æã§æ¬¡ã®ããã«ãã if (! EasyCSRF::check($_POST[EasyCSRF::KEY_NAME])) { echo 'éä¿¡ããããã¼ã¿ãããªããããããã§ã'; die(); } ã³ã¼ã (ãã´ãºãã¦ä½¿ããï¼) <?php // easy_csrf.php // by Hamachiya2 // 2012.02.15 cl
{{#tags}}- {{label}}
{{/tags}}