note 125198 added to filter.filters.sanitize

From: Date: Mon, 20 Jul 2020 17:29:22 +0000
Subject: note 125198 added to filter.filters.sanitize
Groups: php.notes 
Request: Send a blank email to php-notes+get-214880@lists.php.net to get a copy of this message
<?php /* filter all ascii and save juste 0-9 a-Z and @ . _ */ echo alphanum('abcdefghABCDEFGH0123456789/!:;@._'); // return abcdefghABCDEFGH0123456789@._ function alphanum( $string , $x=''){ $h=strlen($string); for($a=0; $a<$h; $a++) { $i = ord($string[$a]); if( ($i==46) || // . ($i==64) || // @ ($i==95) || // _ ($i > 47 && $i < 58) || //0123456789 ($i > 64 && $i < 91) || //ABCDEFGH..Z ($i > 96 && $i < 123) //abcdefgh..z ) { $x .= $string[$a]; } } return $x; } ?> ---- Server IP: 45.112.84.4 Probable Submitter: 103.51.166.36 (proxied: 176.139.229.105) ---- Manual Page -- http://php.net/manual/en/filter.filters.sanitize.php Edit -- https://master.php.net/note/edit/125198 Del: integrated -- https://master.php.net/note/delete/125198/integrated Del: useless -- https://master.php.net/note/delete/125198/useless Del: bad code -- https://master.php.net/note/delete/125198/bad+code Del: spam -- https://master.php.net/note/delete/125198/spam Del: non-english -- https://master.php.net/note/delete/125198/non-english Del: in docs -- https://master.php.net/note/delete/125198/in+docs Del: other reasons-- https://master.php.net/note/delete/125198 Reject -- https://master.php.net/note/reject/125198 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#214880) next »