I'm trying to create a mini tracking web beacon using SLIM framework (php) but it seems only hotmail is refusing it - It's working fine on another VPS of mine with classic php.
Code :
$app->get(
"/test/:token",
function ($token) use ($app) {
$hostname=gethostbyaddr($_SERVER['REMOTE_ADDR']);
$QUERY_STRING = preg_replace("%[^/a-zA-Z0-9@,_]%", '', $_SERVER['QUERY_STRING']);
//saves ip address and timestamp
$str=date("D dS M,Y h:i a") . ",". $_SERVER['REMOTE_ADDR'] .",".$QUERY_STRING.",".$hostname.",".$_SERVER['HTTP_USER_AGENT'].","."\n";
file_put_contents("tracker.txt", $str, FILE_APPEND);
//header("content-type: image/gif");
//$app->contentType("image/jpg");
$app->response()->header('Content-Type', 'content-type: image/gif');
//43byte 1x1 transparent pixel gif
echo base64_decode("R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==");
});
This works fine on GMAIL or any other email.