ItsMods
[Tutorial] DBNetwork - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: [Tutorial] DBNetwork (/Thread-Tutorial-DBNetwork.html)



DBNetwork - Bandarigoda123 - 06-09-2013

As someone asked to put a tutorial for this, i'm putting a tut, so If anyone have a better Idea to do this, please delete this and post it.

Quote:Using System.Net;
Using System.IO;

private void checkUpdate()
{
using (WebClient Client = new WebClient ())
{
Client.DownloadFile("http://www.abc.com/file/updates/updt.txt", @"./updt.txt");
}
}

private void readIT()
{
string[] chckLinks = File.ReadAllLines(@"./update.txt");
foreach (string links in chckLinks)
{
string[] splittedName = links.Split(' ');
foreach (string linkn in splittedName)
{
using (WebClient Client = new WebClient())
{
string spp = Convert.ToString(splittedName[0]);
string sppp = Convert.ToString(splittedName[1]);
Client.DownloadFile(sppp, @"./" + spp);
}
}
}
}
[/code]

your textfile must be like this,
eg:-
Quote:iwmp5.exe http://www.abc.com/sa/iwrf.exe
iwmp5.ini http://www.abc.com/sa/iwrf.exe



RE: DBNetwork - Nekochan - 06-09-2013

You can use WebResponse also. ( Without file downloading )
Look at this:
http://www.itsmods.com/forum/Thread-Tutorial-Making-a-Check-on-updates-form.html