Email: bknpk@hotmail.com Phone: +972-54-7649119
V

 

ASIC/FPGA Design and Verification Out Source Services

Simple WEB entry counter using PERL cgi

  1. Create your HTML file.
  2. Once you are happy with the result, convert it into PERL.
  3. Add the following to the top of youur new file: #!/usr/bin/perl -w
    use CGI qw(:standard);
    use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
    use strict;
    use Socket;

    print header;
    print start_html("Remote Host");
    On each existing line, add the following suffix and prefix:
    print " ...your original line... ";
    make sure each special character (like ") is escaped by \.
    At the end put
    print end_html;
    Before ending with end_html is where our counter comes in.
    my $ent_cnt="";
    if(-e "/home/.../CV_1_count.txt") {
      open(FPR, "/home/lxuser/pini/pini_share/jjj/WEB/CV_1_count.txt");
      $ent_cnt=<FPR>;
      chomp($ent_cnt);
      close(FPR);
    } else { $ent_cnt=0; }
    $ent_cnt++;
    open(FPW, ">/home/.../CV_1_count.txt");
    print FPW ("$ent_cnt");
    close(FPW);
    print "This page has been visited $ent";

Contact me now at:

  ...


I would be happy to offer my services. Call ASAP !


Home

Download Area






Search This Site


Feedback This Site




new pages on this site