/var/www/(Del)explorer-island.com/old/counter.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
require_once('webadmin/configure.php');

$IP getenv("REMOTE_ADDR"); 
$host getenv("HTTP_X_FORWARDED_FOR");
$creationDate date("F j, Y, g:i a");

/*$dbh = mysql_connect("192.168.11.33", "qjcsa", "qjc840414");

if (!$dbh) {
   die('Could not connect: ' . mysql_error());
}
$selected = mysql_select_db("qjcdb",$dbh) 
    or die("Error");*/

$sql "insert into counter (ip, date) values ('"$IP ."', '"$creationDate ."')";
mysql_query($sql);


//$result = mysql_query("SELECT count(*) as x FROM counter");
//$row = mysql_fetch_array($result,MYSQL_ASSOC);
//echo "Visits:&nbsp;". ($row{'x'});
?>