20 lines
765 B
PHP
20 lines
765 B
PHP
<?php
|
|
header('X-Robots-Tag: noindex, nofollow');
|
|
header('Cache-Control: no-cache, no-store, must-revalidate');
|
|
|
|
$path = $_SERVER['REQUEST_URI'];
|
|
$parts = explode('/', trim($path, '/'));
|
|
|
|
if (count($parts) >= 2) {
|
|
$data = $parts[1];
|
|
$log = date('Y-m-d H:i:s') . " | OPEN | " . $_SERVER['REMOTE_ADDR'] . " | " . $data . "\n";
|
|
file_put_contents('/var/log/tracking/opens.log', $log, FILE_APPEND | LOCK_EX);
|
|
|
|
$wevads_url = 'http://157.180.25.208:5821/api/track/open?data=' . urlencode($data);
|
|
$ctx = stream_context_create(['http' => ['timeout' => 1, 'ignore_errors' => true]]);
|
|
@file_get_contents($wevads_url, false, $ctx);
|
|
}
|
|
|
|
header('Content-Type: image/gif');
|
|
echo base64_decode('R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');
|