//
you're reading...
Hacking / Counter Intelligence, Predictive Analytics, Source Code, Tips

Tracking Website Visitors Pt3: Returning Tracking Information

This is just a simple page for reading the hits from the database with your tracking information for the image id involved.

/tracker/status.php

<html>
<body>
<?php
include("db.inc");

if(isset($_GET['id']))
{
	$image_key = cleanInput($_GET['id']);
	$sql="SELECT * FROM tracker_hits WHERE image_key = '$image_key' ORDER BY timestamp DESC";
	$result=mysql_query($sql);
	
	$num=mysql_numrows($result);
	
	mysql_close($con);
	?>
	<table border="0" cellspacing="2" cellpadding="2">
	<tr>
	<td><font face="Arial, Helvetica, sans-serif">user_agent</font></td>
	<td><font face="Arial, Helvetica, sans-serif">remote_addr</font></td>
	<td><font face="Arial, Helvetica, sans-serif">http_referer</font></td>
	<td><font face="Arial, Helvetica, sans-serif">accept_language</font></td>
	<td><font face="Arial, Helvetica, sans-serif">timestamp</font></td>
	</tr>
	
	<?php
	$i=0;
	while ($i < $num) {
	
	$f1=mysql_result($result,$i,"user_agent");
	$f2=mysql_result($result,$i,"remote_addr");
	$f3=mysql_result($result,$i,"http_referer");
	$f4=mysql_result($result,$i,"accept_language");
	$f5=mysql_result($result,$i,"timestamp");
	?>
	
	<tr>
	<td><font face="Arial, Helvetica, sans-serif"><?php echo $f1; ?></font></td>
	<td><font face="Arial, Helvetica, sans-serif"><?php echo $f2; ?></font></td>
	<td><font face="Arial, Helvetica, sans-serif"><a href="<?php echo $f3; ?>" target="_blank"><?php echo $f3; ?></a></font></td>
	<td><font face="Arial, Helvetica, sans-serif"><?php echo $f4; ?></font></td>
	<td><font face="Arial, Helvetica, sans-serif"><?php echo $f5; ?></font></td>
	</tr>
	
	<?php
	$i++;
	}
}
else
{
?>
<form enctype="multipart/form-data" action="upload_image.php" method="post" name="changer">
<input name="MAX_FILE_SIZE" value="102400" type="hidden">
<input name="image" accept="image/jpeg" type="file">
<input value="Submit" type="submit">
</form>
<?php
}
?>
</body>
</html>
  1. Tracking Website Visitors Pt1: Masking Image Requests
  2. Tracking Website Visitors Pt2: Returning Image From Database
  3. Tracking Website Visitors Pt3: Returning Tracking Information
  4. Tracking Website Visitors Pt4: Uploading Image to MySql
  5. Tracking Website Visitors Pt5: Installation Script
Advertisements

About Pythorian

Exploration and Production oriented security consultant for securing IT infrastructures relating to natural resources.

Discussion

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: