= 48 && $int <= 57) || // digits ($int >= 65 && $int <= 90) || // uppercase letters ($int >= 97 && $int <= 122) || // lowercase letters $int == 126 || $int == 45 || $int == 46 || $int == 95 // ~-._ ) { $ret .= chr($int) . $text; continue; } $encoding = strtoupper($encoding); $ret .= '%' . $encoding . $text; } return $ret; } }