| Server IP : 162.215.171.210 / Your IP : 216.73.216.20 Web Server : Apache System : Linux 162-215-171-210.bluehost.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : swansondentalgro ( 1070) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/swansondentalgro/.trash/mu-plugins-old/wpengine-common/ |
Upload File : |
<?php
/**
* Monitor what the requests going to wp-admin/admin-ajax.php
*
* This is useful for determining the cause of high traffic to the admin-ajax.php file
*
* @package Monitor Admin Ajax
* @author Donovan Hernandez
*/
// If it's not a POST request, just move along
if ( $_SERVER['REQUEST_METHOD'] != "POST" ) {
return;
}
// We only want to monitor admin-ajax.php hits.
if ( strpos( $_SERVER['PHP_SELF'], 'wp-admin/admin-ajax.php' ) === false ) {
return;
}
// Load the class
if ( ! class_exists( 'Monitor_Admin_Ajax', false ) ) {
require_once( WPE_PLUGIN_DIR . '/class-monitor_admin_ajax.php' );
}
$logger = Monitor_Admin_Ajax::get_instance();
$logger->write_log();