InLineStats


By James Battersby

Description

InLineStats is a combination of ASP scripts and Perl scripts to allow you to display on your own web pages your current Seti@Home stastics. InLineStats give you access to all of you major statistical information such as the number of units returned, you current rank etc. To be able to use InLineStats you must be able to run both ASP and Perl scripts on you web server, specifically your server must have Microsoft.XMLHTTP installed. If you are able to run Perl but not ASP, then try InLineStatsJS.asp

Download

Download InLineStats V1.1 now (2,434 Bytes)

Version History

  • V1.1 - 13th July 2002
    • Updated to cope with Seti@Home URL change.

Installing

The download file contains three files:

  • mystats.asp - The ASP script section
  • setistats.pl - The Perl script section
  • example.asp - An example of how to use it

You must place these files in directories where your web server can execute them. It is common for the Perl file to be placed in the /cgi-bin/ directory. If you are not sure, you will need to speak to you web server administrator.

Having located the files, you MUST edit them. In the Perl script file you must replace YOUR-EMAIL-ADDRESS with your Email address that is registered with Seti@Home. In the ASP file (mystats.asp), you must replace YOUR-WEB-SITE with your web sites URL. You will also need to check that the Perl file location is correct.

Using InLineStats

To get your stats on your web page, you need to include mystats.asp like this:

<!-- #include file="mystats.asp" -->

This will cause the scripts to run. All of your stats will be placed in a number of variable for you to use as you like. These variables are:

DescriptionVariable Name
Total units returnedUnitsReturned
Current rankRank
Number of users at this rankUsersAtThisRank
Done more work units than (%)DoneMoreThanPercent
Total number of usersTotalUsers
Time last unit returnedLastReturned
Average CPU timeAvgUnitTime
Total CPU timeCPUTime

You can insert a variable at any point on your page after the #include of the ASP script. To do this, simply put <%=variable_name%> and this will be replaced by the actual value.

Finally, it is possible for the scripts to fail. This may be due to the Seti@Home web site being down. To prevent rubbish being displayed, you should check the value of CPUTime and if it's zero you should assume that it has failed. For example:


<html>
<head>
<title>My Stats</title>
</head>
<body>
<!-- #include file="mystats.asp" -->
<%
if not CPUTime = 0 then
%>
<h2>My Current Stats</h2>
<table>
<tr><td>Units returned</td><td>:</td><td><%=UnitsReturned%></td></tr>
<tr><td>Rank</td><td>:</td><td><%=Rank%></td></tr>
<tr><td>Users at this rank</td><td>:</td><td><%=UsersAtThisRank%></td></tr>
<tr><td>Done more than</td><td>:</td><td><%=DoneMoreThanPercent%></td></tr>
<tr><td>Total users</td><td>:</td><td><%=TotalUsers%></td></tr>
<tr><td>Last unit returned</td><td>:</td><td><%=LastReturned%></td></tr>
<tr><td>Average CPU time</td><td>:</td><td><%=AvgUnitTime%></td></tr>
<tr><td>Total CPU time</td><td>:</td><td><%=CPUTime%></td></tr>
</table>
<hr>
<%
else
%>
<p>My Seti stats are currently not available.</p>
<%
end if
%>
</body>
</html>

The above example is included in the download file.


Note:All software on this site is supplied "as is", with no guarantee offered or implied. While every effort has been made to ensure the correct operation of the software, no responsibility is accepted for any loss, damage or charges incurred which may arise from the use of this software. A virus scan has not been performed on the download files, you are advised to do this before running any of the software. Re-distribution of the software is permitted providing that I) no charge is made for it, II) it is distributed in exactly the same form as found on this site, III) you do not take any credit for it's production. Any queries should be directed to the original author.

© 2003 James Battersby.
Main Page | Mail the WebMaster