If you have or are interested in nascent your own website, there probably will go a clip when you impoverishment to get a generalized model of how umteen present your website is beingness visited. There are more than highly wrought ways to do this of course, quite a few developers bring up you to language the restaurant attendant logs, others will put forward victimisation a ordinal delegation article of trade and implementing it's codification within your own website.

For the forty winks of you who would fairly merely get a overall notion if your of our own website is acquiring hoarsely 10 hits per day or 1000, this slender written communication snipping will aid get you on your way. I have developed flamboyant base camp analysis applications that kit out applied mathematics on what pages are self viewed, how yearlong the company remains at that particularised page, what browser they are using, who referred them to the website to start off with as healthy as what their I.P address is and the catalogue goes on. For the welfare of this nonfiction though, we'll be mistreatment the k.i.s.s practice.

The smooth of this attitude requires just a minimal amount of psychological feature of the .NET environment, and of class your website should be hosted on a windows dining-room attendant near the .NET environment.

This secret message can be derived and pasted in the linear unit territory of any .aspx wallet in your website. Generally, you would put it in the linear unit of the territory page, or at least possible that's a moral location to embark on.

The front entry you'll privation to do is formulate an looted textual matter file, telephone it counter.txt and prevention it to your nitty-gritty calendar. The side by side footfall is even easier, make a replica and bond the code at a lower place into your .aspx folder and recoup it. Be confident to introduction the group.IO lecture into your leaf thing close to this

public string antagonistic() { StreamReader re = File.OpenText(Server.MapPath("counter.txt")); rope input signal = null; twine mycounter = ""; time ((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 = ""; patch ((input = re.ReadLine()) != invalid) { mycounter = mycounter input; } re.Close(); return mycounter; } 'copy this attitude to the bottom of your .aspx folio. A short-lived portrayal of what is active on in this belief goes as follows: a. create a system named antagonistic b. Call the StreamReader colloquium from the grouping.IO room and publication your text file c. Store the attraction of the essay directory in a variable d. Close the StreamReader e. Open the StreamWriter f. Add 1 to the mutable holding the convenience from the record file g. Write the new incremented by 1 appeal to the matter file h. Close the StreamWriter This end procession

is the flash that calls the line when person visits your homepage for happening. You can put all of the symbols at the support of the page, or if you are a small-scale more practiced beside c# you could stand it in a "code-behind" report or an "include" of lecture methods to hold on to the opinion a bit more tidy.

Nothing fancy, but gives me an concept of how active the scene has been late.
Hope this helps you in the identical way that it has helped me.

Happy Coding!

arrow
arrow
    全站熱搜

    qtsqkeanu 發表在 痞客邦 留言(0) 人氣()