Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require "test.html";
- session_start();
- $validTags = ["!DOCTYPE", "a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b",
- "base", "basefont", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col",
- "colgroup", "command", "datalist", "dd", "del", "details", "dfn", "dir", "div", "dl", "dt", "em", "embed", "fieldset",
- "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "41", "h5", "h6", "head", "header",
- "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link",
- "map", "mark", "menu", "meta", "meter", "nav", "noframes", "noscript", "object", "ol", "optgroup", "option", "output",
- "p", "param", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source",
- "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th",
- "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"];
- $_SESSION['count'] = 0;
- if(isset($_GET['tag'])) {
- if(in_array($_GET["tag"], $validTags)){
- $_SESSION['count']++;
- echo "Valid HTML Tag!<br>Score:" . $_SESSION['count'];
- } else{
- echo "Invalid HTML Tag!<br>Score: ".$_SESSION['count'];
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement