lots of random stuff

This commit is contained in:
Ben Harris 2020-01-29 17:19:53 -05:00
parent 78fc78d649
commit 2e52b3bd64
218 changed files with 1341 additions and 15 deletions

View File

@ -1,8 +0,0 @@
#!/bin/sh
echo "Content-type: text/plain"
echo ""
curl localhost:4200
exit 0

7
cgi-bin/loadavg.cgi Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
printf "Content-type: text/plain\n"
printf "\n"
printf "%s\n" "$(cut -d ' ' -f 1,2,3 /proc/loadavg)"

View File

@ -1,3 +0,0 @@
#!/usr/bin/fossil
repository: /home/ben/fossil/sqlite.fossil

9
cgi-bin/teapot.cgi Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
printf "Content-type: application/json\n"
printf "Status: 418 I'm A Little Teapot\n"
printf "\n"
printf '{"type": "earl grey"}\n'
exit 0

13
cgi-bin/uptime.cgi Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
printf "Content-type: application/json\n"
printf "\n"
printf '{"hostname": "%s", "uptime": "%s", "since": "%s", "users": "%s"}\n' \
"$(hostname)" \
"$(uptime | sed -e "s/.* up *//" -e "s/ *days, */d/" -e "s/:/h/" -e "s/,.*/m/")" \
"$(uptime -s)" \
"$(online-users)"
exit 0

159
counter/gcount.php Normal file
View File

@ -0,0 +1,159 @@
<?php
/*******************************************************************************
* Title: PHP graphical hit counter (GCount)
* Version: 1.3.1 from 4th January 2015
* Author: Klemen Stirn
* Website: http://www.phpjunkyard.com
********************************************************************************
* COPYRIGHT NOTICE
* Copyright 2004-2015 Klemen Stirn. All Rights Reserved.
* This script may be used and modified free of charge by anyone
* AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
* By using this code you agree to indemnify Klemen Stirn from any
* liability that might arise from it's use.
* Selling the code for this program, in part or full, without prior
* written consent is expressly forbidden.
* Using this code, in part or full, to create derivate work,
* new scripts or products is expressly forbidden. Obtain permission
* before redistributing this software over the Internet or in
* any other medium. In all cases copyright and header must remain intact.
* This Copyright is in full effect in any country that has International
* Trade Agreements with the United States of America or
* with the European Union.
********************************************************************************
ACKNOWLEDGEMENT
Please support future script development by linking to us:
http://www.phpjunkyard.com/about/link2us.php
Or by sending a small donation:
http://www.phpjunkyard.com/about/donate.php
*******************************************************************************/
////////////////////////////////////////////////////////////////////////////////
// SETTINGS
////////////////////////////////////////////////////////////////////////////////
// URL of the folder where script is installed. INCLUDE a "/" at the end!
$base_url = 'counter/';
// Default image style (font)
$default_style = 'cntdwn';
// Default counter image extension
$default_ext = 'gif';
// Count unique visitors? 1 = YES, 0 = NO
$count_unique = 0;
// Number of hours a visitor is considered as "unique"
$unique_hours = 24;
// Minimum number of digits shown (zero-padding). Set to 0 to disable.
$min_digits = 0;
////////////////////////////////////////////////////////////////////////////////
// DO NOT EDIT BELOW
////////////////////////////////////////////////////////////////////////////////
// Turn error notices off
error_reporting(E_ALL ^ E_NOTICE);
// Set the correct MIME type
header("Content-type: text/javascript");
// Tell browsers not to cache the file output so we can count all hits
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
// Is page ID set?
if ( ! isset($_GET['page']) )
{
die('ERROR: The gcount.php file must be called with a <b>?page=PAGEID</b> parameter, for example <b>gcount.php?page=test</b>');
}
// Remove any illegal chars from the page ID
$page = preg_replace('/[^a-zA-Z0-9\-_\.]/','',$_GET['page']);
// Stop if $page is not valid
if ( ! strlen($page) )
{
die('ERROR: Page ID is missing or contains only invalid chars. Please use only these chars for the page ID: a-z, A-Z, 0-9, &quot;.&quot;, &quot;-&quot; and &quot;_&quot;');
}
// Get style and extension information
$style = isset($_GET['style']) ? preg_replace('/[^a-zA-Z0-9\-_\.]/','',$_GET['style']) : $default_style;
$ext = isset($_GET['ext']) ? preg_replace('/[^a-zA-Z0-9\-_\.]/','',$_GET['ext']) : $default_ext;
// Set values for cookie, log file and style flye names
$cname = 'gcount_unique_'.$page;
$logfile = 'logs/' . $page . '.txt';
$style_dir = 'styles/' . $style . '/';
// Does the log file exist?
if ( ! file_exists($logfile) )
{
die('ERROR: Log file not found. Make sure there is a file called <b>' . $page . '.txt</b> inside your <b>logs</b> folder. On most servers file names are CaSe SeNSiTiVe!');
}
// Open log file for reading and writing
if ($fp = @fopen($logfile, 'r+'))
{
// Lock log file from other scripts
$locked = flock($fp, LOCK_EX);
// Lock successful?
if ($locked)
{
// Let's read current count
$count = intval( trim( fread($fp, filesize($logfile) ) ) );
// If counting unique hits is enabled make sure it's a unique hit
if ( $count_unique == 0 || ! isset($_COOKIE[$cname]) )
{
// Update count by 1 and write the new value to the log file
$count = $count + 1;
rewind($fp);
fwrite($fp, $count);
// Print the Cookie and P3P compact privacy policy
header('P3P: CP="NOI NID"');
setcookie($cname, 1, time()+60*60*$unique_hours);
}
}
else
{
// Lock not successful. Better to ignore than to damage the log file
$count = 1;
}
// Release file lock and close file handle
flock($fp, LOCK_UN);
fclose($fp);
}
else
{
die("ERROR: Can't read/write to the log file ($logfile). Make sure this file is writable by PHP scripts. On UNIX servers, CHMOD the log file to 666 (rw-rw-rw-).");
}
// Is zero-padding enabled? If yes, add zeros if required
if ($min_digits)
{
$count = sprintf('%0'.$min_digits.'s', $count);
}
// Print out Javascript code and exit
$len = strlen($count);
for ($i=0; $i<$len; $i++)
{
echo 'document.write(\'<img src="'.$base_url . $style_dir . substr($count,$i,1) . '.' . $ext .'" border="0" />\');';
}
exit();
?>

513
counter/index.php Normal file
View File

@ -0,0 +1,513 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML; 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>PHP graphical hit counter - README</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
/* Style sheet and XHTML code
Author: Mauricio Samy Silva http://www.maujor.com/ A Web Standard evangelist site
City: Rio de Janeiro - Brazil
Contact: maujorcss[at]maujor[dot]com
Date: 2006-05-11
*/
body
{
margin:5px 0;
padding:0;
background:#eee;
color: black;
font : 68.8%/1.5 Verdana, Geneva, Arial, Helvetica, sans-serif;
text-align:center;
}
#wrapper
{
width:700px;
background:#fff;
margin:0 auto;
text-align:left;
border:1px solid #ccc;
padding:10px 20px;
}
h1 {font-size:1.5em;}
h2
{
font-size:1.2em;
border-top:1px solid #999;
padding-top:1.8em;
}
h2.title
{
font-size:1.2em;
border-top:1px solid #999;
padding-top:1.8em;
color: green;
}
h3 {font-size:1.0em;}
span.dest {color:#f00;}
span.example {color:#ff9933;}
span.tip {color:#008000; font-weight:bold;}
p
{
color : black;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 1.0em;
}
address
{
font-weight:bold;
font-style:normal;
}
ul.nobullets
{
margin:0 0 1.0em;
padding:0;
list-style:none;
}
ol li {margin-bottom:1.0em;}
samp, code
{
font-size:1.3em;
font-weight:bold;
}
a:hover
{
color : red;
background:#ccc;
text-decoration : none;
}
table#installation
{
border-collapse:collapse;
margin: 5px 15px 10px -25px;
border: 2px solid #999;
}
table#installation thead
{
text-align:center;
text-transform:uppercase;
}
table#installation tr td, table#installation tr th
{
padding: 2px 5px;
border: 1px solid #ccc;
}
table#installation tr th
{
border-bottom-width:2px;
border-bottom-color:#999;
}
table#installation tr td var
{
font-weight:bold;
font-style:normal;
}
table#installation tr.odd
{
background: #fafafa;
}
div.error
{
border: 1px solid #cd0a0a;
background: #fef1ec;
color: #cd0a0a;
padding-left:10px;
padding-right:5px;
}
div.success
{
border: 1px solid #18760f;
background: #e9ffdb;
color: #363636;
padding-left:10px;
padding-right:5px;
}
div.notice
{
border: 1px solid #fcefa1;
background: #fbf9ee;
color: #363636;
padding-left:10px;
padding-right:5px;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="main">
<h1><span class="dest">PHPGcount</span> -
PHP graphical hit counter</h1>
<ul class="nobullets">
<li>Version: 1.3.1 from 4th January 2015</li>
<li>Developed by: Klemen Stirn</li>
<li><a href="http://www.phpjunkyard.com/php-text-hit-gcount.php" target="_blank">PHP text hit counter</a></li>
<li><a href="http://www.phpjunkyard.com" target="_blank">PHP Scripts from PHPJunkyard.com</a></li>
</ul>
<h2>INDEX</h2>
<ul class="nobullets">
<li><a href="#install"><b>Install hit counter</b></a></li>
<li><a href="#usage">Using hit counter</a></li>
<li><a href="#style">Changing counter style / images</a></li>
<li><a href="#unique">Counting unique hits</a></li>
<li><a href="#custom">Adding custom styles/images to the counter</a></li>
<li><a href="#upgrade">Upgrading from old versions</a></li>
<li><a href="#help">HELP and Troubleshooting</a></li>
<li><a href="#other">Newsletter, rating this script and other</a></li>
<li><a href="#changelog">Changelog</a></li>
</ul>
<h2 id="acknowledgement">&raquo; ACKNOWLEDGEMENT</h2>
<p>Please support developing of free PHP scripts by <a href="http://www.phpjunkyard.com/about/link2us.php">linking to us</a> or <a href="http://www.phpjunkyard.com/about/donate.php">sending a donation</a>. Thank you!<br />&nbsp;</p>
<h2 id="install">&raquo; Install hit counter</h2>
<div class="error">
<p style="font-weight:bold">Please take 5 minutes to read the installation instructions carefully and completely! This will ensure a proper and easy installation.</p>
</div>
<p style="font-weight:bold">Installation steps:</p>
<ol>
<li><p>Connect with FTP to the <i>public folder</i> of your server where the rest of your Web site is.</p>
<p><span class="tip">TIP:</span> The public folder is usually called &quot;<b>public_html</b>&quot;, &quot;www&quot;, &quot;site&quot; or &quot;htdocs&quot;.</p>
<p><span class="tip">TIP:</span> Learn how to FTP files, read my simple <a href="http://www.phpjunkyard.com/tutorials/ftp-chmod-tutorial.php">FTP and CHMOD tutorial</a></p>
</li>
<li><p>Create a new folder where you will install counter. Name it anything you like, for example &quot;counter&quot;.<br />
Example: /public_html/counter<br />
Corresponding URL: http://www.site.com/counter</p></li>
<li><p>Open file <b>gcount.php</b> in a plain text editor like Notepad and find this line:</p>
<pre>$base_url = '<span class="dest">http://www.yourwebsite.com/gcount/</span>';</pre>
<p>Change the address to the URL of the folder that you created in Step 2:</p>
<pre>$base_url = '<span class="example">http://www.site.com/counter/</span>';</pre>
<p><span class="dest">Please make sure you end the address with <b>/</b></span></p>
</li>
<li><p>Upload all counter files and folders to your server. The <b>styles</b> folder must be transferred in BINARY mode, all other files in ASCII mode.</p>
<p><span class="tip">TIP:</span> Most FTP clients will select the proper transfer mode automatically.</li>
<li><p>Make sure the following files are writable by PHP:<br />
- file <b>test.txt</b> inside <b>logs/</b> folder - on Unix (Linux) servers CHMOD this file to <b>666</b> (rw-rw-rw-)</p>
<p><span class="tip">TIP:</span> Learn to CHMOD files, read my simple <a href="http://www.phpjunkyard.com/tutorials/ftp-chmod-tutorial.php">FTP and CHMOD tutorial</a></p>
<p><span class="tip">TIP:</span> CHMOD doesn't work on Windows, you might need to ask your hosting company to set file permissions.</p>
</li>
<li>
<p>Test the counter by opening <b>gcount.php?page=test</b> in your browser, for example:<br />
http://www.yourwebsite.com/counter/gcount.php?page=test</p>
<p>Your browser should show something like<br /><b>document.write('1');</b></p>
</li>
</ol>
<p>Got an error message instead? See below under <a href="#help">HELP and Troubleshooting</a>.<br />&nbsp;</p>
<h2 id="usage">&raquo; Using hit counter</h2>
<p>To use the hit counter on your website you need to:</p>
<ol>
<li><p>Create an empty text file for each page you want to count visits on.</p>
<p>Example valid names: <b>page1.txt</b>, <b>index.txt</b>, <b>some_long_name.txt</b>, <b>buy-now.txt</b>
<p>Valid names contain only letters (a-z, A-Z), digits (0-9), dots &quot;.&quot;, underscores &quot;_&quot; and hyphens &quot;-&quot;</p>
</li>
<li>Upload these text files into the <b>logs</b> folder to your server and make
sure PHP scripts have permission to write to them. On Unix (Linux) servers you will need to CHMOD files to <b>666</b> (rw-rw-rw-).</li>
<li>To start counting visitors place this code in your web page:</p>
<pre>&lt;script type=&quot;text/javascript&quot; src=&quot;http://<span class="dest">www.site.com</span>/counter/gcount.php?page=<span class="dest">test</span>&quot;&gt;&lt;!--
//--&gt;&lt;/script&gt;</pre>
<p>Change http://<span class="dest">www.site.com</span>/counter/gcount.php
to the URL address of gcount.php on your server, for example:<br />
http://<span class="example">www.yourwebsite.com</span>/counter/gcount.php</p>
<p>Change <span class="dest">test</span> to the name of a text file you created in Step 1 (without &quot;.txt&quot;), for example:<br />
http://www.yourwebsite.com/counter/gcount.php?page=<span class="example">index</span></p>
<p><span class="tip">TIP:</span> Not sure how to paste Javascript code into your website? See this tutorial:<br />
<a href="http://www.phpjunkyard.com/tutorials/cut-paste-code.php" target="_blank">Cut and paste code into HTML document</a></p>
</li>
<li><p>Open your website and there should be a number (count) displaying where the Javascript code has been pasted.<br />&nbsp;</p></li>
</ol>
<h2 id="style">&raquo; Changing counter style / images</h2>
<p>PHPGcount comes with these image styles by default: <b>57chevy</b>, <b>7seg</b>, <b>bbldotg</b>, <b>bellbtm</b>,
<b>blgrv</b>, <b>cntdwn</b>, <b>computer</b>, <b>ds9</b>, <b>fdb</b>, <b>led</b>, <b>links</b>, <b>marsil</b>, <b>sbgs</b> and <b>web1</b>.</p>
<p>You may set (test) these styles by adding &quot;&amp;style=STYLENAME&quot; to the Javascript <b>src</b> parameter.</p>
<p>Replace STYLENAME with the name of the style (names are CaSe SeNSiTiVE on most servers!). For example, if you want to test how style <b>led</b> looks you would use this code to display the counter:</p>
<pre>&lt;script type=&quot;text/javascript&quot;
src=&quot;http://www.site.com/counter/gcount.php?page=test<span class="dest">&amp;style=led</span>>&quot;&gt;&lt;!--
//--&gt;&lt;/script&gt;</pre>
<p>If no &amp;style=STYLENAME is added to the src parameter, PHPGcount will use the default style, as set in the $default_style variable inside gcount.php.</p>
<p>To change default style open gcount.php in a text editor and find line:</p>
<pre>$default_style = 'web1';</pre>
<p>To change default style to <b>57chevy</b> you would modify the line to say:</p>
<pre>$default_style = '57chevy';</pre>
<p>By adding the &amp;style=STYLENAME you may use the same script on multiple pages, each with its own style of display! You may even add your own styles to the counter, more info on that further down.<br />&nbsp;</p>
<h2 id="unique">&raquo; Counting UNIQUE hits</h2>
<p>If you wish to count unique visits (hits) only, open file <b>gcount.php</b> in a plain text editor like Notepad.</p>
<p>Find this line:</p>
<pre>$count_unique = <b>0</b>;</pre>
<p>Change it to:</p>
<pre>$count_unique = <b>1</b>;</pre>
<p>You can control how many hours a visitor is considered as unique by changing value of line:</p>
<pre>$unique_hours = 24;</pre>
<p>The default value will count visitor as unique only once per 24 hours. To count as unique once per 12 hours you would change the line to:</p>
<pre>$unique_hours = 12;</pre>
<p><b>Save changes and upload the modified gcount.php file to your server.</b><br />&nbsp;</p>
<h2 id="zeropadding">&raquo; Zero-padding (minimum digits to display)</h2>
<p>Want your counter to display a minimum number of digits? For example
instead of <b>123</b> show <b>00123</b>?</p>
<p>No problem, open file <b>gcount.php</b> in a plain
text editor like Notepad and find line:</p>
<pre>$min_digits = 0;</pre>
<p>Change <b>0</b> to the minimum number of digits you wish to display. To display minimum 5 digits set it to:</p>
<pre>$min_digits = <b>5</b>;</pre>
<p>To disable zero-padding simply change $min_digits back to 0</p>
<p><b>Save changes and upload the modified gcount.php file to your server.</b><br />&nbsp;</p>
<h2 id="custom">&raquo; Adding custom styles/images to the counter</h2>
<p>All you need is ten (10) images (equal height and width), each with one number (0,1,2,3,4,5,6,7,8,9) on it.</p>
<p>Save image with number 0 as 0.gif (or 0.jpg or 0.png or whatever format you use), image
with 1 to 1.gif, image with 2 to 2.gif etc... so you have 10 images, each with one number.</p>
<p>Then create a new folder in the <b>styles</b> directory - the name of the folder will
be the name of your style. For example if you want to call the style <b>myblue</b>
you would create folder <b>styles/myblue</b> and upload all ten images
to that folder.</p>
<p>Then you could just set the myblue style as the default style or use &amp;style=myblue (both explained above) where you want the myblue to be used.</p>
<p>If your style images are different type then the default image extension (as
set in gcount.php in <b>$default_ext</b>) you can add <b>&amp;ext=EXTENSION</b>
to the script src parameter. Replace extension with the file extension (<b>without the dot!</b>) of the images of your style.</p>
<p>That probably sounded a bit confusing, but it really isn't, here's an example:</p>
Let's say you are using style web1 by default, which has GIF file format images with <b>.gif</b> extension. That's why you have <b>$default_ext</b> value in gcount.php set to:</p>
<pre>$default_ext = 'gif';</pre>
<p>Now you created your own style myblue. You saved images as JPEG files meaning they have <b>.jpg</b> extension, which is different from the default one (.gif).</p>
<p>Simply you must add <b>&amp;ext=jpg</b> to the counter code in order to use your style counter:</p>
<pre>&lt;script type=&quot;text/javascript&quot;
src=&quot;http://www.domain.com/counter/gcount.php?page=PAGENAME<span class="dest">&amp;style=myblue&amp;ext=jpg</span>&quot;&gt;&lt;!--
//--&gt;&lt;/script&gt;</pre>
<p><b>NOTE:</b> All the styles that come with PHPGCount by default are GIF type!<br />&nbsp;</p>
<h2 id="upgrade">&raquo; Upgrading from old versions</h2>
<div class="error">
<p style="font-weight:bold">Please take 5 minutes to read the upgrade instructions carefully and completely! This will ensure a proper and easy installation.</p>
</div>
<p><b>From version 1.3</b></p>
<ol>
<li>Upload the new gcount.php file to your server</li>
</ol>
<p><b>From version 1.2</b></p>
<ol>
<li>Upload the gcount.php file to your server</li>
<li>Rename gcount.php to graphcount.php or update your Javascript code src parameter gcount.php</li>
</ol>
<p><b>From version 1.0 or 1.1</b></p>
<ol>
<li>Rename all files inside &quot;logs&quot; from name.<b>log</b> to name.<b>txt</b></li>
<li>Make sure PHP scripts can write to files inside &quot;logs&quot; folder. On Unix (Linux) servers you will need to CHMOD these files to <b>666</b> (rw-rw-rw-).</li>
<li>Upload the new gcount.php file to your server</li>
<li>Rename gcount.php to graphcount.php or update your Javascript code src parameter gcount.php<br />&nbsp;</li>
</ol>
<h2 id="help">&raquo; HELP and Troubleshooting</h2>
<h3>1. What is CHMOD and FTP?</h3>
<p>I prepared a simple <a href="http://www.phpjunkyard.com/tutorials/ftp-chmod-tutorial.php">FTP and CHMOD tutorial</a> that will help you FTP files to your server and set correct CHMOD settings.<br />&nbsp;</p>
<h3>2. I did CHMOD text files, but I still get an error.</h3>
<p>CHMOD doesn't work on all servers, Windows (IIS) servers, for example, don't understand CHMOD command.
On Windows you need to make sure the <i>Internet Guest Account</i> (IUSR) has permission to modify, write and read the required
files.</p>
<p>In case you still can't get it to work, contact your hosting company
and ask them to set modify/write/read permissions for the text files inside your logs folder.<br />&nbsp;</p>
<h3>3. ERROR: The gcount.php file must be called with a ?page=PAGEID parameter</h3>
<p>Your are missing <b>?page=PAGEID</b> in your Javascript code behind gcount.php, see up under <a href="#usage">Using hit counter</a>.<br />&nbsp;</p>
<h3>4. ERROR: Log file not found.</h3>
<p>The script can't find your log file. A few things to check:</p>
<ol>
<li>Did you create an empty text file? If you are calling the script with <i>gcount.php?page=<b>mypage</b></i>
you need to have an empty text file called <b>mypage.txt</b> inside your &quot;logs&quot;
folder!</li>
<li>File names are CaSe SeNSiTiVe on most servers! MYPAGE.TXT is not the same
as mypage.txt. Make sure your file name is in the correct case.</li>
<li>Did you use any special characters in your file name? Try naming the files
only with letters (a-zA-Z) and digits (0-9).<br />&nbsp;</li>
</ol>
<h3>5. I don't see counter images</h3>
<p>Check two things:</p>
<ol>
<li>Is the <b>$base_url</b> setting inside gcount.php correct? Don't forget to add a trailing / to the URL!</li>
<li>Style names are CaSe SeNSiTiVe on most servers! Make sure your style setting exactly matches the name of the style<br />&nbsp;</li>
</ol>
<h3>6. I am still having problems!</h3>
<p>Search the <a href="http://developers.phpjunkyard.com">Support forum</a> (username: <b>php</b> password: <b>php</b>)<br />&nbsp;</p>
<h2 id="other">&raquo; Stay updated!</h2>
<p>Join my FREE newsletter and you will be notified about new scripts, new versions of the existing scripts and other important news from PHPJunkYard.<br />
<a href="http://www.phpjunkyard.com/newsletter.php" target="_blank">Click here for more info</a><br />&nbsp;</p>
<h2>&raquo; Please rate this script</h2>
<p>If you like this script please rate it or even write a review at:</p>
<p><a href="http://php.resourceindex.com/rate?05216" target="_new">Rate this Script @ The PHP Resource Index</a></p>
<p><a href="http://www.hotscripts.com/Detailed/36872.html" target="_blank">Rate this Script @ Hot Scripts</a></p>
<h2>&raquo; Get more useful FREE scripts!</h2>
<p>Looking for more <a href="http://www.phpjunkyard.com" target="_blank">PHP scripts</a>? Here is a list of PHPJunkyard FREE scripts:</p>
<ul>
<li><a href="http://www.hesk.com" target="_blank">Help Desk Software</a></li>
<li><a href="http://www.phpjunkyard.com/php-click-counter.php" target="_blank">Click and download counter</a></li>
<li><a href="http://www.phpjunkyard.com/php-link-manager.php" target="_blank">Reciprocal links manager</a></li>
<li><a href="http://www.phpjunkyard.com/php-guestbook-script.php" target="_blank">Guestbook</a></li>
<li><a href="http://www.phpjunkyard.com/php-message-board.php" target="_blank">Message board</a></li>
<li><a href="http://www.phpjunkyard.com/php-text-hit-counter.php" target="_blank">Text hit counter</a></li>
<li><a href="http://www.phpjunkyard.com/php-graphical-hit-counter.php" target="_blank">Graphical hit counter</a> (this script)</li>
<li><a href="http://www.phpjunkyard.com/random-image.php" target="_blank">Random image</a></li>
<li><a href="http://www.phpjunkyard.com/random-text.php" target="_blank">Random text</a><br />&nbsp;</li>
</ul>
<h2 id="changelog">&raquo; CHANGELOG</h2>
<p><b>Changes in 1.3.1</b><br />
- set correct MIME type for servers sending nosniff header</p>
<p><b>Changes in 1.3</b><br />
- greatly improved reliability of counter on busy websites in multi-threaded environment<br />
- added headers to prevent browser caching</p>
<p><b>Changes in 1.2</b><br />
- fixed a bug with counting unique visits over several pages</p>
<p><b>Changes in 1.1</b><br />
- improved input parameter checking<br />
- added file locking<br />
- added zero-padding option<br />
- added support for counting unique hits<br />
- no more automatic file creation (for security reasons)<br />
- removed referrer check (not really needed anymore)</p>
<p>&nbsp;</p>
<p style="text-align:center">&copy; Copyright <a href="http://www.phpjunkyard.com">PHP Scripts from PHPJunkyard</a> 2004-2015. All rights reserved.</p>
</div>
</div>
</body>
</html>

4
counter/logs/index.php Normal file
View File

@ -0,0 +1,4 @@
<?php
http_response_code(403);
die('forbidden');

1
counter/logs/index.txt Normal file
View File

@ -0,0 +1 @@
232

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

View File

@ -0,0 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>403 Forbidden</TITLE>
</HEAD><BODY>
<H1>Forbidden</H1>
You don't have permission to access this folder.<P>
<hr />
</BODY></HTML>

BIN
counter/styles/7seg/0.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

BIN
counter/styles/7seg/1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

BIN
counter/styles/7seg/2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

BIN
counter/styles/7seg/3.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

BIN
counter/styles/7seg/4.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

BIN
counter/styles/7seg/5.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

BIN
counter/styles/7seg/6.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

BIN
counter/styles/7seg/7.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 848 B

BIN
counter/styles/7seg/8.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

BIN
counter/styles/7seg/9.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

View File

@ -0,0 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>403 Forbidden</TITLE>
</HEAD><BODY>
<H1>Forbidden</H1>
You don't have permission to access this folder.<P>
<hr />
</BODY></HTML>

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>403 Forbidden</TITLE>
</HEAD><BODY>
<H1>Forbidden</H1>
You don't have permission to access this folder.<P>
<hr />
</BODY></HTML>

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 677 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>403 Forbidden</TITLE>
</HEAD><BODY>
<H1>Forbidden</H1>
You don't have permission to access this folder.<P>
<hr />
</BODY></HTML>

BIN
counter/styles/blgrv/0.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 939 B

BIN
counter/styles/blgrv/1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 804 B

BIN
counter/styles/blgrv/2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 966 B

BIN
counter/styles/blgrv/3.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 B

BIN
counter/styles/blgrv/4.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 928 B

BIN
counter/styles/blgrv/5.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 966 B

BIN
counter/styles/blgrv/6.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 B

BIN
counter/styles/blgrv/7.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

BIN
counter/styles/blgrv/8.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

BIN
counter/styles/blgrv/9.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 954 B

View File

@ -0,0 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>403 Forbidden</TITLE>
</HEAD><BODY>
<H1>Forbidden</H1>
You don't have permission to access this folder.<P>
<hr />
</BODY></HTML>

BIN
counter/styles/cntdwn/0.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

BIN
counter/styles/cntdwn/1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 B

BIN
counter/styles/cntdwn/2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

BIN
counter/styles/cntdwn/3.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 864 B

BIN
counter/styles/cntdwn/4.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

BIN
counter/styles/cntdwn/5.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

BIN
counter/styles/cntdwn/6.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

BIN
counter/styles/cntdwn/7.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

BIN
counter/styles/cntdwn/8.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

BIN
counter/styles/cntdwn/9.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

View File

@ -0,0 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>403 Forbidden</TITLE>
</HEAD><BODY>
<H1>Forbidden</H1>
You don't have permission to access this folder.<P>
<hr />
</BODY></HTML>

Binary file not shown.

After

Width:  |  Height:  |  Size: 898 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 939 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -0,0 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>403 Forbidden</TITLE>
</HEAD><BODY>
<H1>Forbidden</H1>
You don't have permission to access this folder.<P>
<hr />
</BODY></HTML>

BIN
counter/styles/ds9/0.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 B

BIN
counter/styles/ds9/1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

BIN
counter/styles/ds9/2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 B

BIN
counter/styles/ds9/3.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 B

BIN
counter/styles/ds9/4.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 B

BIN
counter/styles/ds9/5.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 B

Some files were not shown because too many files have changed in this diff Show More