Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Counter?

Posted on 1999-07-25
8
Medium Priority
?
271 Views
Last Modified: 2010-03-04
  I have a homepage which I want to add a counter on how many person visited the said page.  What I didn't understand is how do I create my homepage...

Will it be on perl so that it automatically display my homepage with counter itself.

Or will i write it on html and call a cgi.

  Im still learning perl and as i follow some sample perl script I've noticed that when they call a cgi then the return result is displayed in another window.  But I want my counter to be in the same window with my homepage. Can u help me? Pls.... :D
0
Comment
Question by:athan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 10

Accepted Solution

by:
viktornet earned 40 total points
ID: 1214396
0
 

Author Comment

by:athan
ID: 1214397
thanks viktornet... Yes the counter's work but how can i apply the cgi.  Do I really have to create my homepage in perl or just plane html?
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1214398
your CGI should create the page... so you can simply read your HTML file, then add the counter thingy, and then create your new page, and display it...

..-=ViKtOr=-..
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:athan
ID: 1214399
thanks viktornet... Yes the counter's work but how can i apply the cgi.  Do I really have to create my homepage in perl or just plane html?
0
 

Author Comment

by:athan
ID: 1214400
can u give me a sample by creating a page on cgi and read the html file as it will create a new page.  A simple one will do... thanks
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1214401
here is an example that would open any file..

open(file, "nameoffile.ext");
$text = <file>;
close(file);
print $text;

This will print whatever is in nameoffile.ext

This is just Perl, actually, not implemented for use with CGI, and stuff.... you need a few more things in order to do that.. probbaly would have to read environment settings and stuff...

Good Luck!!

..-=ViKtOr=-..
0
 

Author Comment

by:athan
ID: 1214402
thank you
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1214403
athan, hello again!!

I created a counter a few days ago, if you'd like to take a look at it, please let me know. I will tell you what I did step by step to get it to work... it is at http://delphisite.hypermart.net

..-=ViKtOr=-..
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question