I need Java code for a simple graphical hit counter for a webpage

I was wondering if anybody out there could send me some code for a simple graphical hit counter for a webpage. All the sites that I've visited are garbage and of no use to me. Please help me.
Colin

Not as easy as you'd imagine with applets. You need some way to store the hits, usually through a file on the server. That's not gonna happen in a hurry for 2 reasons -
- Applets can't read/write files
- Your web server usually won't let you run programs on their machine (ie, programs that listen for socket connections from applets, then load/read/write/close a file).
In short, no, there is no simple java solution (that I know of).
Cheers,
Radish21

Similar Messages

  • I Need Java code for following Algorithm

    * I Need Java code for following algorithm. Kindly any one help.
    1. Read the contents (ideas and its corresponding scores) from two files named as 'a' and 'b'.
    2. Stored the file 'a' contents in array a[].
    3. Stored the file 'b' contents in array b[].
    4. compare both files like
    if(a.equals(b[j])
    Writing the common idea and add the score from file 'a' and 'b'.
    else
    write the uncommon idea and its score..
    For example :
    Form Agents.txt
    action,65
    architecture,85
    eco-,15
    essay,30
    form,85
    form,85
    link,40
    tangent,25
    Form Agents1.txt
    Black holes,69
    essay,78
    Herewith i have above mentioned two files named as Form Agents and Form Agents1.
    Form Agents has eight fields
    Form Agents1 has two fields
    --> 'essay' is common in two files, so store the idea 'essay' and add the score from Form Agents score is '30' and Form Agents1 has 78 (essay 108).
    Finally it stores idea in another file with uncommon fields also.
    Please help us.

    We have tried with following code.
    But we cant add the scores.
    For Example:
    Form Agents.txt --> has "essay,30"
    Form Agents1.txt --> has "essay,78"
    Result is: essay,108
    Finally it stores idea in another file with uncommon fields also.
    So Any one pls correct the following code.
    try
    DataOutputStream o1=new DataOutputStream(new
    FileOutputStream("C:\\Interfaces\\interfaces\\temp\\BlackBoard\\My Design
    World\\Project\\Material\\art\\System Agents\\Form Agents\\CandidateResponses\\Form
    Agents.txt"));
    //Reading the contents of the files
    BufferedReader br= new BufferedReader(new InputStreamReader(new
    FileInputStream("C:\\Interfaces\\interfaces\\temp\\BlackBoard\\My Design
    World\\Project\\Material\\art\\System Agents\\Form Agents\\Ideological\\Form
    Agents.txt")));
    BufferedReader br1= new BufferedReader(new InputStreamReader(new
    FileInputStream("C:\\Interfaces\\interfaces\\temp\\BlackBoard\\My Design
    World\\Project\\Material\\art\\System Agents\\Form Agents\\Related\\Form
    Agents.txt")));
    while((s=br.readLine())!=null)
    s1+=s+"\n";
    while((s2=br1.readLine())!=null)
    s3+=s2+"\n";
    int numTokens = 0;
    StringTokenizer st = new StringTokenizer(s1);
    String[] a = new String[10000];
    String[] br_n=new String[10000];
    int i=0;
    while (st.hasMoreTokens())
    s2 = st.nextToken();
    a=s2.substring(0,s2.length()-3);
    s6=s2.substring(s2.length()-2);
    br_n[i]=s6;
    i++;
    numTokens++;
    int numTokens1 = 0;
    StringTokenizer st1 = new StringTokenizer (s3);
    String[] b = new String[10000];
    String[] br1_n=new String[1000];
    int j=0;
    while (st1.hasMoreTokens())
    s4 = st1.nextToken();
    b[j]=s4.substring(0,s4.length()-3);
    s7=s4.substring(s4.length()-2);
    br1_n[j]=s7;
    j++;
    numTokens1++;
    int x=0;
    for(int m=0;m<a.length;m++)
    for(int n=0;n<b.length;n++)
    if(a[m].equalsIgnoreCase(b[n])){
    int sc=Integer.parseInt(br_n[m]);
         int sc1=Integer.parseInt(br1_n[n]);
    int score=sc+sc1;
         o.writeBytes(a[m]+","+score+"\n");
    break;
    else
    o.writeBytes(a[m]+","+br_n[m]+"\n");
    break;
    }catch(Exception e){}

  • I need java code for chating application

    i need java code for chating application. plz help me

    GANGINENI wrote:
    i need java code for chating application. plz help meGIYF.
    [http://today.java.net/pub/a/today/2006/10/05/instant-messaging-for-jabber-with-smack.html|http://today.java.net/pub/a/today/2006/10/05/instant-messaging-for-jabber-with-smack.html]
    File under: lern2Google

  • I need java code to flatten an image

    Hy! I need java code to flatten an image/sketch...someone can help me? Thanks to everybody!

    http://java.sun.com/developer/technicalArticles/Security/JCE/ ?

  • Need  java code to perform refresh button action using swings and awt

    i need java code to perform refresh button action using swings and awt.please help me

    Wait ! Noboby ? OK, I'll do it
    public void onBtnAction ()
        if (!fresh)
            refresh ();
    }Seriously, did you expect anyone to answer such a cryptic question ?

  • Looking for a simple flip book template for Flash CS5

    Hi, I'm looking for a simple flip book template for Flash CS5 for a 20 page brochure/ booklet. Or a tutorial. Does anyone know of one?
    Thanks!

    Hi Mark,
    No need to restrict your choice to the preset Pages Templates. Do a web search and choose a Word template. Pages will open Word documents and templates. Or design your own:
    This is a Table I inserted into a blank Pages Word Processing document. Format the date column in Inspector > Table > Format > Cell Format. Select the first Date cell,then drag the fill handle down to increment the dates.
    Regards,
    Ian.

  • Hit Count for a KM Folder

    Hi,
    Is there any way we can track the hit count for a particular folder in KM?
    Is there any particular default event where we can listen for this?
    Helps will be appreciated...
    Regards
    BP

    Hi BP
    This is the most recent information om KM statistics by Thilo Brandt:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7d28a67b-0c01-0010-8d9a-d7e6811377c0
    I don't know if it is possible, but I'd guess it's possible to alter that code in order to get some statistics on folder-level as well as item-level.
    Kind regards,
    Martin Søgaard

  • Need Java Code or Program to compare 2 XML files ???

    Hi All,
    I need Any java code snippet to compare 2 XML files? Please help me..
    Thanks,
    J.Kathir

    Can you explain which possibilities you rejected while searching for that on the Internet? That may give us some insight into your actual requirements.

  • Need java code to make MySql Dump?

    Do anybody know how to write java code to make MySql Dump. I am badly need of this code very urgently!, do any body here to help me!
    Kindly help me out.

    Urgency means two things:
    - either your homework is late (do it yourself)
    - or you have a deadline on your job (ask a co-worker)
    Both isn't really making me want to answer your question. Your time isn't more valuable than that of the others.
    And the big question is probably not "how to write the Java code" but "how to make a MySQL dump", Java or not. RTFM for that, and then use either MySQL or Runtime.exec.

  • Need JAVA code to create OIM ITresource-connection values are in a csv file

    Hi,
    Could any one plz help me with the java code used / tested before to create OIM IT resource dynamically, for the reference. IT resource parameter (connection) values in a .csv file, where in I've multiple environments.
    Thanks,
    Ramesh
    Edited by: user13267745 on Aug 19, 2010 12:37 AM

    Hi Gregg,
    You can create one transformation from the DataStore to itself.  In the "Technical" rules group, set 0RECORDMODE = 'X' (before image) or 'R' (reverse).  Therefore, when you execute its corresponding DTP, all existing records shouldl be set to zero.
    Then, as a second step, you can execute the DTP which is related to the transformation between the DataStore and the DataSource, thus loading the new records.
    I hope this helps you.
    Regards,
    Maximiliano

  • URGENT : Need java code snippet to retrieve uniquemember values OID 11g API

    Hi All,
    We have a requirement to retrieve the uniquemember attribute values using OID 11g API. We are using labeleduri approach for dynamic groups and thus all the uniquemember values are created using dynamic groups.
    When we are trying to retrieve the uniquemember values using Java code snippet, it is not returning the values. The strange thing is: The uniquemember values created using dynamic groups are not visible in ODSM OID console or JExplorer tool. However those values are visible in LDAP Browser v2.8.1 tool.
    So can somebody throw light on this? Any pointers or sample code snippet to retrieve uniquemember values would be grateful.
    Thanks
    Mahendra.

    Hi All,
    We have a requirement to retrieve the uniquemember attribute values using OID 11g API. We are using labeleduri approach for dynamic groups and thus all the uniquemember values are created using dynamic groups.
    When we are trying to retrieve the uniquemember values using Java code snippet, it is not returning the values. The strange thing is: The uniquemember values created using dynamic groups are not visible in ODSM OID console or JExplorer tool. However those values are visible in LDAP Browser v2.8.1 tool.
    So can somebody throw light on this? Any pointers or sample code snippet to retrieve uniquemember values would be grateful.
    Thanks
    Mahendra.

  • Hit Counter For Web Site

    I've published a site to .Mac for a friend, and her domain name, which is hosted on godaddy is being forwarded to the .mac site. I'm using masking so only her domain name shows in the address bar of each page. That's all working well.
    I've added a hit counter through iweb to the first page but it won't show up when I go to the site by using the domain name. If I go to it using the .mac address it shows up. What's odd is if I go to the site first by using the .mac address where the counter always shows up then go to the site by putting in the domain name it will then show up there as well. If I go to the site again later by the domain name-no counter. If I repeat this by using the .mac address first then going back, it's there.
    I read other past posts about this issue but I didn't see if it could be completely resolved. I normally use Safari but even when I use Firefox it doesn't show up either.
    Can anyone help?
    John

    John:
    If you added the hit counter from within iWeb then that's the reason it doesn't show up. It will only work on the .Mac server.
    What you need to do is use StatCounter.com. It requires some post publication editing of the page that you want the counter on. If you make changes to the page later on then you'll have to reedit the page again.
    What has been suggested is to put a text box with "STATCOUNTER" in it where you want the counter to appear. Then in the post publication file, search for STATCOUNTER and replace it with the code that the site provides you.
    With that you can get daily, weekly hits, a world map of where the hits came from and lots more. There's a variety of text or image counters.
    In this site, Old Toad's Tutorials I put the STATCOUNTER in the main text box at the bottom and make the text orange. When I added the counter, it comes up in the text and color that I chose. If you put it in it's own text box, you can use the stye that StatCounter provides when you set up the counter.
    Do you Twango?

  • I have just bought a MacBook Air in Madrid, but the keyboard types ç when I hit -, for example, when I hit shift for the bracket sign I get *. How can I re-set it to type what I see on the keys.

    I have just bought a MacBook Air in Madrid, but the keyboard types, for example, ¿ when I hit shift and the semi-colon key, and = when I hit the ! key. What do I have to do to reset it to function normally?

    Go>Preferences>Language & Text>Input Sources
    Click off the flags of the countries you want--like if you need a British keyboard that has a British pound symbol, pick that one.
    When you're done picking, them leave preferences. Now, in the upper right-hand corner of your computer, next to the date, you'll see a little flag. Click on that. You'll see all the flags you picked. Choose the one you want. Your keyboard will now give you the symbols, letters, etc. that you would get if you'd bought the computer in that country.

  • Hit counter for  "free" podcasts?

    Whilst I appreciate that download counts for commercial offerings are inappropriate, is it at all possible to find out the extent of download activity on free channels. Or would one have to go back to the original server logs to analyse this?
    G5   Mac OS X (10.4.4)  

    Sorry, but I can´t found the counter in my author page here . Is it becouse I´m a junior weblogger?
    I would like to know if my work does worth or not.
    PD: It would be great if the Sap Business One main page would be updated with new topics, as my weblog, and a link to the San Francisco TechSummit presentation files for example.
    Thanks,
    Ibai Peñ

  • Need Java code for random text.

    To all you Java programmer Gurus out there.
    How hard is it to make a small Java program whose whole purpose is to ask a user how many random characters they want and then proceeds to generate a text file full of RANDOM characters A-Z and a-z ?
    The characters could repeat it does not matter as long as they repeat randomly.
    I've found all kinds of code examples for Random password generators and things like that but none quite do what I want them to do.
    sample of what the output file might look like
    "fdfbgHBukOKiIkolpPkmNytTrFvDsVbNmNHyygrRDeDsSEfFGHGjJkjKKoJH"
    Thank You kindly in Advance

    JasonP wrote:
    To all you Java programmer Gurus out there.
    How hard is it to make a small Java program whose whole purpose is to ask a user how many random characters they want and then proceeds to generate a text file full of RANDOM characters A-Z and a-z ? Not hard, in fact not hard at all.
    Thank You kindly in AdvanceYou're quite welcome!

Maybe you are looking for

  • I purchased a second express to use a extender. not sure how to set it up to for airplay to run off of the original air play from 1st express,

    need help setting up second express as a range extender for my air play from 1st station which is up stairs and plugged into my home theater?????

  • HP Monitor 2311x cutting-out

    When I use my 2311x as an external monitor for my Macbook Pro, the monitor will start up and work until I try to move a window from the screen of my MacBook to the monitor, at which point the monitor will become disconnected from the computer. It wil

  • Crash on Save As

    Acrobat 9.3.0 Pro Acrobat crashes every time I SaveAs Windows reports: AppName: acrobat.exe     AppVer: 9.3.0.148     ModName: ntdll.dll ModVer: 5.1.2600.5755     Offset: 0001b21a The file is saved OK. It's just irritating to have to reopen Acrobat e

  • Filtered Role

    Can filtered role be used to filter users in the external ldap. I hav added another datastore in access manager which is also used for authentication of users. Now i want to create a role for making policies. It is not possible to select individual u

  • Missing "+" tabs to open new tab.

    Just installed FF 4RC1 on Win 7; nice, and seems much faster. One minor thing has me a bit perplexed: I'm missing the small "+" tabs at the end of each tab that are used to open a new tab. I just have the "new tab" icon on the toolbar. I installed al