Jump to content
Sign in to follow this  
emoyasha

_unicodeini

Recommended Posts

emoyasha

well the format is basically the same, but you must place a ~ after every set of data and an aditional = at the end of every line

example ini:

[languages]
Arabic=العربية
Bulgarian=Български=
Chinese=中国=
Chineset=中國=
Danish=Dansk=
Dutch=Nederlands=
Finnish=Suomi=
French=Français=
German=Deutsch=
Hindi=हिन्दी=
Italian=Italiano=
~
[sets]
1=1=
2=2=
~

Dont mind the code its still very ugly xD

(this works a lot faster than i expected it to)

func _unicodeini($inifile, $section, $key)
$LangFile = FileOpen($inifile, 128)
$inifilec = FileRead($LangFile)
$inisets = StringSplit($inifilec, "~")
$y = UBound($inisets)
$x = 1
while $x < $y
    $string = StringSplit($inisets[$x], "]")
    $string2 = StringReplace($string[1], "[", "")
    $x = $x + 1
    $test = StringInStr($string2, $section)
    if $test = 0 Then
        
    Else
        $inikey = StringSplit($string[2], "=")
        $b = UBound($inikey)
        $a=1
        while $a < $b
        $test = StringInStr($inikey[$a], $key)
        
        $a = $a + 1
    if $test = 0 Then
        
    Else
        return $inikey[$a]
    EndIf
WEnd

    EndIf
    
    
wend
EndFunc

Spoiler

Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.