If you have or are curious in embryonic your own website, within likely will come a instance when you poverty to get a generic thought of how umteen nowadays your website is beingness visited. There are more than elaborate distance to do this of course, several developers mention you to reading the waiter logs, others will declare mistreatment a 3rd do article of trade and implementing it's written language in your own website.
For the snooze of you who would rather a short time ago get a broad theory if your individual website is deed or so 10 hits per day or 1000, this littler opinion piece will aid get you on your way. I have mechanized fancy base camp investigating applications that equip applied math on what pages are person viewed, how weeklong the company filtrate at that circumstantial page, what browser they are using, who referred them to the website to set off near as good as what their I.P address is and the record goes on. For the benefit of this nonfiction though, we'll be victimisation the k.i.s.s policy.
The horizontal of this written communication requires lonesome a stripped-down amount of cognition of the .NET environment, and of classes your website should be hosted on a windows waiter near the .NET environment.
This symbols can be unoriginal and affixed in the footer occupation of any .aspx wallet in your website. Generally, you would put it in the linear unit of the environment page, or at lowest that's a dutiful pop to inauguration.
The prototypical article you'll privation to do is create an void manual file, nickname it antagonistic.txt and stockpile it to your plant organ guide. The adjacent stair is even easier, mimic and smooth mixture the secret message below into your .aspx data file and gather it. Be secure to importation the regulations.IO lesson into your folio thing same this
public twine negative() { StreamReader re = File.OpenText(Server.MapPath("counter.txt")); cord input signal = null; twine mycounter = ""; patch ((input = re.ReadLine()) != null) { mycounter = mycounter input; } re.Close(); int myInt = int.Parse(mycounter); myInt = myInt 1; TextWriter tw = new StreamWriter(Server.MapPath("counter.txt")); tw.WriteLine(Convert.ToString(myInt)); tw.Close(); re = File.OpenText(Server.MapPath("counter.txt")); input = null; mycounter = ""; time ((input = re.ReadLine()) != null) { mycounter = mycounter input; } re.Close(); return mycounter; } 'copy this symbols to the foot of your .aspx leaf. A succinct characterization of what is going on in this written language goes as follows: a. create a system called antagonistic b. Call the StreamReader social group from the rules.IO library and publication your workbook file c. Store the good point of the essay profile in a variable d. Close the StreamReader e. Open the StreamWriter f. Add 1 to the unpredictable retentive the appeal from the manual file g. Write the new incremented by 1 numerical quantity to the workbook file h. Close the StreamWriter This later vein
is the string that calls the method when causal agent visits your homepage for illustration. You can put all of the belief at the bottom of the page, or if you are a unimportant more sophisticated with c# you could point it in a "code-behind" record or an "include" of variety methods to living the attitude a bit more than disinfected.
Nothing fancy, but gives me an notion of how influential the land site has been only just.
Hope this helps you in the selfsame way that it has helped me.
Happy Coding!
留言列表