On Thu, Jun 29, 2006 at 12:03:43AM -0600, Google Kreme wrote:

> <?php
> 
> $URL = "%74%6c%61%67%75%73%67%68%38%32.%63%61%66%65%32%34.%63%6f%6d";
> $myString = explode('%', $URL);
> 
> foreach ($myString as $value) {
>     if (substr($value, -1) == '.') {
>         echo chr(hexdec($value)).'.';
>     } else {
>         echo chr(hexdec($value));
>     }
> }
> ?>
> 
> fugly, but it yields "tlagusgh82.cafe24.com" and is understandable to  
> someone who doesn't speak php.

Won't that break if the URL contains non-encoded characters other than
period?

Ronald

-- 
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to