//gethostbyaddr("65.55.106.131");
//$IPInfo = file("http://api.hostip.info/get_html.php?ip=".$TheIP.""); //Quick GeoLocation: http://www.dreamincode.net/forums/showtopic16693.htm
#Keep Stats - Jeff P.
require_once($_SERVER["DOCUMENT_ROOT"] . "/includes/db_accessnum.php");
$tempconn = @mysql_connect("localhost", $dbUser, $dbPass);
@mysql_select_db($dbName);
$tempip = $_SERVER["REMOTE_ADDR"];
$tempthedate = $_SERVER["REQUEST_TIME"];
$temppage = $_SERVER["PHP_SELF"];
$temprefer = $_SERVER['HTTP_REFERER'];
$tempres = @mysql_query("SELECT * FROM stats WHERE ip = \"$tempip\" AND page = \"$temppage\"", $tempconn);
if(@mysql_num_rows($tempres) > 0){
//Update
@mysql_query("UPDATE stats SET thedate=FROM_UNIXTIME($tempthedate), count=count+1 WHERE ip=\"$tempip\" AND page=\"$temppage\"", $tempconn);
}else{
//Insert
@mysql_query("INSERT INTO stats VALUES (\"$tempip\", FROM_UNIXTIME($tempthedate), 1, \"$temppage\")", $tempconn);
$temphost = @gethostbyaddr($tempip);
$tempipinfo = @file("http://api.hostip.info/get_html.php?ip=" . $tempip . "");
$tempcountry = @explode(':', $tempipinfo[0]);
$tempcountry = @trim( $tempcountry[1] );
$tempcity = @explode(':', $tempipinfo[1]);
$tempcity = @trim( $tempcity[1] );
@mysql_query("INSERT INTO stats_extra VALUES(\"$tempip\", \"$temphost\", \"$tempcity\", \"$tempcountry\", FROM_UNIXTIME($tempthedate))", $tempconn);
unset($temphost);
unset($tempipinfo);
unset($tempcountry);
unset($tempcity);
}
if(!empty($temprefer)){
@mysql_query("INSERT INTO stats_refer VALUES (\"$temprefer\")", $tempconn);
}
#Release Temp Variables
unset($tempconn);
unset($tempip);
unset($tempthedate);
unset($temppage);
unset($temprefer);
unset($tempres);
?>
Michigan ISP - GLIS·NET
|
/* Config Part --------------------------------------------------------------------------------------------------------------*/
$directory = "/home/glisoffice/domains/glisoffice.net/public_html/ad_rotator/"; // Webserver path to your adrotator files
$linkfile = "linkcode.inc"; // The Link Code file
$adcountfile = "displayad.inc"; // The Ad Display file
$pos = "right"; // Postion of banner tag (left, center or right)
$help_msg = "no"; // Display a "Help Message" - "Yes" to enable!
$help_message = "Please support this site by clicking on the banner below"; // Enter "Help Message" here
/* End of Config Part -------------------------------------------------------------------------------------------------------*/
// Leave below this line alone - If you modify anything below I can assure you it will mess up!
// the file holding the advert number to view next
$num = file($directory.$adcountfile);
// the file holding the link codes
$adverts = file($directory.$linkfile);
// tells the script to look at the next item in the array
$num = $num[0]+1;
// counting the number of adverts - using function count()
$number = count($adverts);
// If ran out of adverts, start again!
if($num>$number-1){
$num=0;
}
// write the current number to the file
if (file_exists($directory.$adcountfile)) {
$nu = fopen ($directory.$adcountfile, "w");
fputs($nu,$num);
}
else {
die("Can't find file Check ad-count file ($adcountfile) exists Check file with links ($linkfile) exists Check directory ($directory) is correct");
}
// display the link on the page
if($help_msg == "yes"){
echo "{$pos_statag}$help_message{$pos_endtag}";
}
echo "$adverts[$num] ";
?>
|
Fri Jun 09, 2023 23:43:43 |
|
|
- GLIS·NET Contact -
We can be contacted in the following ways:
- US Mail:
Main Office:
GLISNET, Inc.
16987 18 Mile Rd.
Clinton Twp, Mi. 48038
1·888·445·4763
Billing Department:
GLISNET, Inc.
13335 15 Mile Rd.
Sterling Hgts., Mi. 48312
- E-Mail:
Admin -- admin@glis.net
Support -- support@glis.net
Information -- info@glis.net
Web Master -- webmaster@glis.net
- FAX:
+1 (586) 226·8746
|
|
|
 |
|