# wpremote/5.42/protect/logger/db.php

The WP Remote WordPress Plugin, version 5.42. 26 lines.

- Page: https://pluginprobe.com/plugins/wpremote/5.42/code/protect/logger/db.php
- Raw: https://pluginprobe.com/plugins/wpremote/5.42/raw/protect/logger/db.php
- Modified: 2023-12-01T07:27:02+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wpremote/5.42/code/protect/logger/db.php#L10-L20`.

```php
<?php
if (!defined('ABSPATH') && !defined('MCDATAPATH')) exit;

if (!class_exists('WPRProtectLoggerDB_V542')) :
class WPRProtectLoggerDB_V542 {
	private $tablename;
	private $bv_tablename;

	const MAXROWCOUNT = 100000;

	function __construct($tablename) {
		$this->tablename = $tablename;
		$this->bv_tablename = WPRProtect_V542::$db->getBVTable($tablename);
	}

	public function log($data) {
		if (is_array($data)) {
			if (WPRProtect_V542::$db->rowsCount($this->bv_tablename) > WPRProtectLoggerDB_V542::MAXROWCOUNT) {
				WPRProtect_V542::$db->deleteRowsFromtable($this->tablename, 1);
			}

			WPRProtect_V542::$db->replaceIntoBVTable($this->tablename, $data);
		}
	}
}
endif;
```
