Jump to content

Read ini from website


Recommended Posts

I need my script to be able to read an ini on my free web host, heres the script.

#cs
News Module
Created by me =D
#ce

#include <GUIConstants.au3>

GUICreate("News Module", "200", "200")
$mainpw = iniread("blizzstuff.t35.com/News.ini", "Main", "Password", "None")
$write = GuiCtrlCreateButton("Write", 10, 10, 40, 40, $BS_ICON)
GUICtrlSetImage(-1, "wi0054-48.ico", -1)
$up = GuiCtrlCreateButton("Upadte", 50, 10, 40, 40, $BS_ICON)
GuiCtrlSetImage(-1, "wi0064-48.ico", -1)
$list = guictrlcreatelist("Click the update button", 10, 50, 150, 150)
$set = ""
GuiSetState()

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $write
            _Password()
        Case $msg = $up
            _Update()
    EndSelect
Wend

Func _Password()
$UserPw = InputBox("Password", "Please enter password", "Password")
if $UserPw = $mainpw Then
$news = InputBox("News module", "Please insert news you would like others to see.")
inidelete("blizzstuff.t35.com.com/News.ini", "main", "News")
iniwrite("blizzstuff.t35.com/News.ini", "Main", "News", $news)
EndIf
EndFunc

Func _Update()
$news2 = iniread("blizzstuff.t35.com/News.ini", "Main", "News", "none")
guictrlsetdata($list, $news2)
endfunc

now i just need some help, and i tred the search thingy ma bobber

Link to comment
Share on other sites

crazy code!

a) to even read the ini, it needs to be publicly accessible, and it has a password in it.

B) you cannot write to an ini file over the web, not by regular methods.

c) you cannot delete sections in an ini file over the web, see B).

etc.

You could read the news from there. But read only. This..

GUICreate("News Module", "200", "200")
InetGet("http://blizzstuff.t35.com/News.ini", "C:\news.ini")
$mainpw = iniread("C:\news.ini", "main", "password", "none")
MsgBox(64, "password", $mainpw, 10)
exit

Displays a dialog with your (publicly accessible) password in it.

Works fine.

-mu

[edit]sheesh! I need to learn to spell![/edit]

Edited by mr.underperson
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...