ä»æ¥ã¯ãPHPã§ãã使ç¨ãããæ£è¦è¡¨ç¾ã¨ã³ã¸ã³ã§ããPCREï¼Perl Compatible Regular Expressionï¼ã®ãä½ãç¥ããã¦ããªãï¼ã¨æãï¼å¶ç´ã«ã¤ãã¦æ¸ãã¾ãã ããã°ã©ã é¡æã¯ä¸ã®PHPããã°ã©ã ã§ãã <?php header('Content-Type: text/html; charset=latin1'); $url = $_REQUEST['url']; if (preg_match('/^(.*?):/s', $url, $match)) { $scheme = $match[1]; if ($scheme !== 'http' && $scheme !== 'https') { exit; } } echo '<a href="'. htmlspecialchars($url). '">link</a>'; å¤é¨ããåãåã£ããurlããã©ã¡ã¼ã¿
{{#tags}}- {{label}}
{{/tags}}