0byt3m1n1
Path:
/
home1
/
aserty
/
www
/
qct
/
[
Home
]
File: RecordPHPBayClicks.php
<?php ########################################################################## ## Quality Click Tracking ## ## Version 2 Released 10/26/2010 ## ## ---------------------- ## ## By Sonja Ray Tropical Web Works ## ## (http://www.isoldwhat.com) ## ## ## ## You may NOT sell or redistribute this script without permission ## ## ## ## Copyright (c) 2010 TropicalWebWorks.com - All Rights Reserved ## ## This script is made available "as is" and ## ## no warrantees are express or implied ## ########################################################################## include 'connclicks.php'; // grab the POSTed variables $Site = isset($_POST['Site']) ? QCTescape(trim($_POST['Site'])) : '' ; $CampID = isset($_POST['CampID']) ? QCTescape(trim($_POST['CampID'])) : '' ; $CustomID = isset($_POST['CustomID']) ? QCTescape(trim($_POST['CustomID'])) : '' ; $ItemNum = isset($_POST['ItemNum']) ? QCTescape(trim($_POST['ItemNum'])) : '' ; $IP = isset($_POST['IP']) ? QCTescape(trim(str_replace(' ','/',$_POST['IP']))) : '' ; $theRemoteHost = strlen($IP) > 0 ? gethostbyaddr($IP) : ''; $DBReferer = isset($_POST['Referer']) ? QCTescape(trim($_POST['Referer'])) : '' ; $UserAgent = isset($_POST['UserAgent']) ? QCTescape(trim($_POST['UserAgent'])) : '' ; $URL = isset($_POST['theurl']) ? QCTescape(trim($_POST['theurl'])) : '' ; $thecountry = isset($_POST['thecountry']) ? QCTescape(trim($_POST['thecountry'])) : '' ; $theitemtitle = isset($_POST['theitemtitle']) ? QCTescape(trim($_POST['theitemtitle'])) : '' ; date_default_timezone_set('America/Phoenix'); $clicktime = date('Y-m-d H:i:s'); $insertquery = " INSERT INTO `".QCTDBName."`.`".$tablename."` (`ClickTime`, `Site`, `CampID`, `CustomID`, `ItemNum`, `IP`, `Refered`, `UserAgent`, `URL`, `Country`, `ItemTitle`, `RemoteHost`) VALUES ( '$clicktime', '$Site', '$CampID', '$CustomID', '$ItemNum', '$IP', '$DBReferer', '$UserAgent', '$URL', '$thecountry', '$theitemtitle', '$theRemoteHost' ) "; $insert = mysql_query($insertquery) or die('Bad insert query: ' . mysql_error()); exit; ?>