Sign in to follow this  
Followers 0
Bounda

Read ini from website

4 posts in this topic

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

Share this post


Link to post
Share on other sites



Try downloading the INI file into the temp folder first. :)


[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

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  
Followers 0