note 44934 added to function.ord

From: Date: Fri, 20 Aug 2004 15:08:48 +0000
Subject: note 44934 added to function.ord
Groups: php.notes 
Request: Send a blank email to php-notes+get-74997@lists.php.net to get a copy of this message
In a respons of the ascii_encode() function of merwetta_at_hotmail.com I wrote a ascii_decode() function. Don't feel secure by hiding your e-mail address in encoded ASCII, this function decodes ASCII encoded charakters. <?php function ascii_decode($input) { preg_match_all("(&#([0-9]{1,3});)", $input, $matches); $asciiCodes = array_unique($matches[1]); foreach ($asciiCodes as $asciiNr) $input = str_replace("&#$asciiNr;", chr($asciiNr), $input); return $input; } ?> -- Sijmen Ruwhof ---- Manual Page -- http://www.php.net/manual/en/function.ord.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+44934 Delete -- http://master.php.net/manage/user-notes.php?action=delete+44934&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+44934&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#74997) next »