Raised This Month: $ Target: $400
 0% 

%x


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 05-08-2007 , 11:37   Re: %x
Reply With Quote #7

Seems to work fine ... but there could be bugs inside.
Just in the case someone would need it:

PHP Code:
url_safe(unsafe_string[], safe_string[])
    {
        new 
unsafe[] =
            {
                
0x240x260x2b0x2c0x2f0x3a0x3b0x3d0x3f0x40,
                
0x200x220x3c0x230x250x7b0x7c0x7d0x5c0x5e0x7e0x5b0x5d0x60
            
}

        new 
safe[][4] =
            {
                
"%24""%26""%2b""%2c""%2f""%3a""%3b""%3d""%3f""%40",
                
"%20""%22""%3c""%23""%25""%7b""%7c""%7d""%5c""%5e""%7e""%5b""%5d""%60"
            
}

        new
            
length strlen(unsafe_string),
            
max_length length 3

        
for (new 0lengthi++)
            {
                new 
bool:safe_char true

                
for (new 024j++)
                    {
                        if (
unsafe_string[i] == unsafe[j])
                            {
                                
format(safe_stringmax_length"%s%s"safe_stringsafe[j])
                                
safe_char false

                                
break;
                            }
                    }

                if (
safe_charformat(safe_stringmax_length"%s%c"safe_stringunsafe_string[i])
            }
    } 
alien is offline
Send a message via ICQ to alien
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode