![]() |
Read INI's from web server? - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Read INI's from web server? (/showthread.php?tid=273) |
Read INI's from web server? - Leighland - 26-08-2006 I want to know if it's possible to read INI data from a webserver or FTP. I know how to read files, I just don't knwo how to read specific information from them. Example: I want to open News.ini from valaron.awardspace.com News.ini looks like this: Code: [News] I want to read the news and show it on the main menu, then after log in, read the Motd and display it in the chat box... just not sure how I would do that. Any help would be appreciated ![]() - Not2BeTrusted2 - 01-09-2006 yea i think it is possible.. but this is how i would do it =p i would put a control for webbrowser in my program and make it invisible so u only receive information from it like that - Leighland - 02-09-2006 Mind explaining that... or to steal a quite from you "yea ok i cant find any tutorials so can some1 juss gimmi the codes like the subs/functions/types" - grimsk8ter11 - 02-09-2006 use INet to download the file from the webserver, then use putvar/getvar. thats what hes saying, and yes, it will work. - Matt - 02-09-2006 You might be able to substitute the app.path part, with the inet url, and maybe, it will work. I will try in a bit. - Reece - 02-09-2006 Easy. Upload a html with your news in and call it news.html In componts look for thease ![]() put then both in the projects form where you want them. Call the browser brow1 add this code to form load Code: brow1.navigate "http://urlhere" Code: Private sub cmdbutton_click I cleaned this up, if you have any questions just ask ![]() - Leighland - 04-09-2006 Okay, I'll try that when I get the chance, thanks. - Matt - 04-09-2006 Okay, that reads the stuff, but the game won't read it as an ini file. Does anyone know how to read an ini type file from a text box in VB? - Reece - 04-09-2006 inis are slow, thats alot easier. No need to update the ini just the webpage ![]() - Matt - 05-09-2006 I don't see how that would work, maybe you could explain it to me. And if you want faster, just go with access or go with mysql. - Reece - 05-09-2006 What this does is reads directly from a webpage. The two componatns i tell you to add is to allow a webpage in your form. This is a very simple tutrorial but i used this to make my webbrowser for my school project ![]() - grimsk8ter11 - 05-09-2006 Code: Public Function DownloadFile(srcFileName As String, targetFileName As String) thats from GSDs old updater, you should have no problem figuring out what needs to be chhanged around. (frmUpdate and removal of albels you dont have). It downloads the file to your directory and you can read it from there. |