ItsMods

Full Version: DBNetwork
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
You can use WebResponse also. ( Without file downloading )
Look at this:
http://www.itsmods.com/forum/Thread-Tuto...-form.html