Click here to Skip to main content
13,249,401 members (29,986 online)
Click here to Skip to main content
Add your own
alternative version


8 bookmarked
Posted 12 Aug 2013

Making Site Address Finder in C#

Rate this:
Please Sign up or sign in to vote.
Address Finder is a kind of program that helps the user to find new available URL of a website.


What is address finder? Address finder is a kind of program that helps the user to find new available URL of a website. It can be useful when we want to change our current web URL or it expired and we want to show our new available web address to users. Other good usages of address finder is in some countries which websites become filter in that places and admins want to show users their new address.

Anyway, Address Finder algorithm is a good example for beginners practice.


Generally, most of Address Finder programs algorithms are based on text file stream reading which are located in a host. By this, admin can write new address on that text file and new address will be shown to user who uses that address finder.

Some other advanced address finders are made from two parts. The first part is under user control and user can read address by that and the second part is under admin control and he can write new address to main source. Also this address finder is included with ads and some useful features.

Actually for offering address finders, admin must put address finder download link in a place where user downloads it and after that, the user can open it in order to see new available address.

Using the Code

I subdivide the way of creating Address Finder to some basic steps which can do them easily. Also, you must have noticed that I am talking about the easiest way of making Address Finder and in other methods, you can do something else. Now, it is time for coding!

  1. First Step: At first, we need to create a text file with Notepad and then add URL address (which we want to show as new address to user) to it. For example, I create link.txt and then type to it.
  2. Second Step: Now you must upload that text file to a trusted host. In this example, my uploaded link is
  3. Third Step: Now, in our C# solution, we must add a button and code in order to read that text file which is now uploaded to a specific host. My code in button click event:
       System.Net.WebClient WebClient = new System.Net.WebClient(); 
       WebClient.DownloadFile("", @"link.txt"); 
       StreamReader reader = new StreamReader(@"link.txt"); 
       string URLvalue = reader.ReadToEnd(); 
       textBox1.Text = URLvalue; 
    catch { }      

    Code Explanation: In this method, we start reading our text file on internet host by using a StreamReader. It is designed for character input in a particular encoding, whereas the Stream class is designed for byte input and output. We can use StreamReader for reading lines of information from a standard text file. More

    Also, don't forget that StreamReader class needs System.IO using.

  4. Last Step: All done successfully. Also, you can add a button for going to detected URL like below code:
    if (textBox1.Text != "")
                    catch (Exception ex)
                        MessageBox.Show(ex.Message, "Error", 
                          MessageBoxButtons.OK, MessageBoxIcon.Error);
                    MessageBox.Show("At first please push 'Search' button please.");

Now, your Address Finder is finished and you can work on its graphic. Mine & my friend's Address Finder are like below:

Also, you can download this example source code from links which are placed at the top of the page.


As I mentioned before, Address Finders are good programs (especially in countries with site filtering policy) for finding new available URL of website and also its algorithm can be informative for beginner programmers. For example, in Iran, all of Music and Movie download centers use address finder to show their new address to users.

Article in other Languages

Iranian members or readers of CodeProject can download the Persian video tutorial of this tip by clicking here and also they can read the Persian version of this tip from this link.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Amir Mohammad Nasrollahi
Chief Technology Officer Artificial Intelligence Developers - (AID)
Iran (Islamic Republic of) Iran (Islamic Republic of)
Amir Mohammad Nasrollahi is an Iranian computer science scholar, entrepreneur and he is the chief executive officer of the software company AID between its foundation in 2013 up to now. He raised two controversial theory in IoT & Artificial Intelligence in 2014-2015 and now works on them.

Research Interests
- Innovative research and Development in the field of computer science.
- Artificial intelligence, Machine learning and AI algorithms and paradigms.
- Self-knowledge, Self-consciousness & Unconscious brain functions.
- Cloud computing & Internet of things.
- Optimal management and Entrepreneurship pathology.

You may also be interested in...


Comments and Discussions

Question[My vote of 1] Lang?! Pin
user998763513-Aug-13 7:18
memberuser998763513-Aug-13 7:18 
AnswerRe: [My vote of 1] Lang?! Pin
Amir Mohammad Nasrollahi13-Aug-13 8:12
professionalAmir Mohammad Nasrollahi13-Aug-13 8:12 
GeneralRe: [My vote of 1] Lang?! Pin
David H. Wright14-Aug-13 1:56
professionalDavid H. Wright14-Aug-13 1:56 
AnswerRe: [My vote of 1] Lang?! Pin
Amir Mohammad Nasrollahi14-Aug-13 4:38
professionalAmir Mohammad Nasrollahi14-Aug-13 4:38 
GeneralMy vote of 5 Pin
ketan italiya12-Aug-13 22:44
professionalketan italiya12-Aug-13 22:44 
GeneralRe: My vote of 5 Pin
Amir Mohammad Nasrollahi13-Aug-13 0:05
professionalAmir Mohammad Nasrollahi13-Aug-13 0:05 
GeneralMy vote of 5 Pin
Reza Khan Mohammad12-Aug-13 11:49
professionalReza Khan Mohammad12-Aug-13 11:49 
GeneralRe: My vote of 5 Pin
Amir Mohammad Nasrollahi12-Aug-13 11:51
professionalAmir Mohammad Nasrollahi12-Aug-13 11:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.171114.1 | Last Updated 12 Aug 2013
Article Copyright 2013 by Amir Mohammad Nasrollahi
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid