CGI Scripts - Users Online And Today Hits

by Hiroshi on 09-04-2008

Here are two CGI scripts ready to use. Users online and Today's Hits.

Always Remember with CGI

775 and 777. File executable permissions and folder data storage permissions.
Upload cgi files in ascii mode of ftp. (Transfer mode-->ASCII)

Always give files and folders executable permissions via CHMOD.

Users Online CGI Script

We use in it a file called online.cgi and an empty folder called data. Both are in cgi-bin/online/. Make a folder online in cgi-bin folder of your root directory. Place online.cgi in it with CHMOD 775. Make a folder in online dir named as data and CHMOD it to 777.
Call online.cgi by java script by this method in any webpage where you want counter to be displayed.
<script language="JavaScript" src="cgi-bin/online/online.cgi?output=javascript"></script>

Download online.cgi file and full example

Today Hits CGI Script

We use in it a file called today.cgi and an empty folder called data. Both are in cgi-bin/today/. Make a folder named as today in cgi-bin. Place today.cgi in it with CHMOD 775. Make a folder in today dir named as data and CHMOD it to 777.
Call today.cgi by java script by this method in any webpage where you want counter to be displayed.
<script language="JavaScript" src="cgi-bin/today/today.cgi?output=javascript" mce_src="cgi-bin/today/today.cgi?output=javascript"></script>

Download today.cgi file and full example

  • Share/Save/Bookmark

Stumble it Digg it Bookmark it Tweet it Share at Facebook

Related Posts

Post a Comment

Comment will appear here after approval, Thanks for patience