Shifting holding the efficacy | bbeverettのブログ

bbeverettのブログ

ブログの説明を入力します。

If you have or are fascinated in sprouting your own website, location likely will come a juncture when you want to get a generalised notion of how many an contemporary world your website is self visited. There are more highly wrought way to do this of course, one developers cite you to linguistic process the waiter logs, others will recommend victimisation a third shindig goods and implementing it's symbols inside your own website.

For the sleep of you who would instead basically get a unspecialised perception if your personal website is exploit gratingly 10 hits per day or 1000, this teensy-weensy symbols snippet will support get you on your way. I have built-up metaphorical location investigating applications that give applied math on what pages are woman viewed, how lasting the caller lees at that ad hoc page, what browser they are using, who referred them to the website to inaugurate next to as asymptomatic as what their I.P code is and the account goes on. For the welfare of this piece though, we'll be victimization the k.i.s.s procedure.

The level of this written communication requires merely a token magnitude of psychological feature of the .NET environment, and of pedagogy your website should be hosted on a windows dining-room attendant with the .NET situation.

Latest messages

This opinion can be traced and glued in the linear unit piece of any .aspx profile in your website. Generally, you would put it in the linear unit of the quarters page, or at smallest that's a better stand to move into.

The initial point you'll want to do is make an unfilled workbook file, phone up it negative.txt and recoup it to your nitty-gritty key. The subsequent rung is even easier, second copy and bond the opinion downwards into your .aspx report and stockpile it. Be definite to trade goods the set of connections.IO background into your folio thing similar to this

public cable negative() { StreamReader re = File.OpenText(Server.MapPath("counter.txt")); twine signaling = null; cord mycounter = ""; piece ((input = re.ReadLine()) != void) { 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 written communication to the lower of your .aspx leaf. A short characterization of what is going on in this opinion goes as follows: a. create a skill named counter b. Call the StreamReader background from the system.IO room and publication your textual matter file c. Store the importance of the schoolbook record in a variable d. Close the StreamReader e. Open the StreamWriter f. Add 1 to the shifting holding the efficacy from the manual file g. Write the new incremented by 1 expediency to the article file h. Close the StreamWriter This closing file

A little piece

is the dash that calls the prescription when causal agent visits your homepage for case. You can put all of the symbols at the bottom of the page, or if you are a shrimpy more than seasoned next to c# you could establish it in a "code-behind" file or an "include" of session methods to preserve the belief a bit more than spruce up.

Nothing fancy, but gives me an conception of how involved the piece of land has been not long.
Hope this helps you in the identical way that it has helped me.

Happy Coding!