Skip to content

Commit

Permalink
added all purpose wttdotm pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
wttdotm committed Aug 21, 2024
1 parent fa18fe7 commit 70d091d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions www/diyPixel/morryProjPixel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

//THIS RETURNS THE IMAGE
header('Content-Type: image/gif');
//this is non-caching stuff
header("Pragma: no-cache"); //HTTP 1.0
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
readfile('pixel.gif');

// Get other info
$ip = $_SERVER['REMOTE_ADDR'];
$referringUrl = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'Direct';
$queryParams = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : 'No query parameters';


//THIS IS THE SCRIPT FOR THE ACTUAL TRACKING
$date = date('Y-m-d H:i:s', $_SERVER['REQUEST_TIME']);
$txt = $date.",". $ip.",". $referringUrl.",". $queryParams;
$myfile = file_put_contents('/var/www/morryProjLog.txt', $txt.PHP_EOL , FILE_APPEND);
exit;

?>

0 comments on commit 70d091d

Please sign in to comment.