HEX
Server: Apache/2.4.6 (CloudLinux) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.16
System: Linux s1.gigspace.ru 3.10.0-962.3.2.lve1.5.77.el7.x86_64 #1 SMP Mon Dec 12 07:06:14 EST 2022 x86_64
User: samok164 (6070)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: /var/www/samok164/data/www2/culture-style.ru/rzgn/r4_getlog.php
<?php

error_reporting(0);

function error($msg = '') {
	header('HTTP/1.1 500 Internal Server Error');
	exit($msg);
}

if (empty($_GET['engine']))
	error('Param engine is empty');
	
if (!in_array($_GET['engine'], array('yandex', 'google')))
	error('Unknown engine: ' . $_GET['engine']);

$r4_logfile = $_SERVER['DOCUMENT_ROOT'] . '/rzgn/seenby' . $_GET['engine'] . '.rzg';

if (!file_exists($r4_logfile))
	error('File not found: ' . $r4_logfile);

$action = array_intersect(array('get', 'delete'), 
	explode(',', 
		(empty($_GET['action']) ? 'get' : $_GET['action'])
	)
);

if (in_array('get', $action))
	echo file_get_contents($r4_logfile);

if (in_array('delete', $action))
	unlink($r4_logfile);