$81 GRAYBYTE WORDPRESS FILE MANAGER $71

SERVER : premium134.web-hosting.com #1 SMP Thu Mar 13 14:29:12 UTC 2025
SERVER IP : 162.0.232.104 | ADMIN IP 216.73.216.206
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/raydofqv/raydget.vip/wp-content/plugins/mailchimp-for-wp/includes/

HOME
Current File : /home/raydofqv/raydget.vip/wp-content/plugins/mailchimp-for-wp/includes//class-debug-log-reader.php
<?php

/**
 * Class MC4WP_Debug_Log_Reader
 */
class MC4WP_Debug_Log_Reader
{
    /**
     * @var resource|null
     */
    private $handle;

    /**
     * @var string
     */
    private static $regex = '/^(\[[\d \-\:]+\]) (\w+\:) (.*)$/S';

    /**
     * @var string
     */
    private static $html_template = '<span class="time">$1</span> <span class="level">$2</span> <span class="message">$3</span>';

    /**
     * @var string The log file location.
     */
    private $file;

    /**
     * MC4WP_Debug_Log_Reader constructor.
     *
     * @param $file
     */
    public function __construct($file)
    {
        $this->file = $file;
    }

    /**
     * @return string
     */
    public function all()
    {
        return file_get_contents($this->file);
    }

    /**
     * Sets file pointer to $n of lines from the end of file.
     *
     * @param int $n
     */
    private function seek_line_from_end($n)
    {
        $line_count = 0;

        // get line count
        while (! feof($this->handle)) {
            fgets($this->handle);
            ++$line_count;
        }

        // rewind to beginning
        rewind($this->handle);

        // calculate target
        $target  = $line_count - $n;
        $target  = $target > 1 ? $target : 1; // always skip first line because oh PHP header
        $current = 0;

        // keep reading until we're at target
        while ($current < $target) {
            fgets($this->handle);
            ++$current;
        }
    }

    /**
     * @return string|null
     */
    public function read()
    {

        // open file if not yet opened
        if (! is_resource($this->handle)) {
            // doesn't exist?
            if (! file_exists($this->file)) {
                return null;
            }

            $this->handle = @fopen($this->file, 'r');

            // unable to read?
            if (! is_resource($this->handle)) {
                return null;
            }

            // set pointer to 1000 files from EOF
            $this->seek_line_from_end(1000);
        }

        // stop reading once we're at the end
        if (feof($this->handle)) {
            fclose($this->handle);
            $this->handle = null;
            return null;
        }

        // read line, up to 8kb
        $text = fgets($this->handle);

        // strip tags & trim
        $text = strip_tags($text);
        $text = trim($text);

        return $text;
    }

    /**
     * @return null|string
     */
    public function read_as_html()
    {
        $line = $this->read();

        // null means end of file
        if (is_null($line)) {
            return null;
        }

        // empty string means empty line, but not yet eof
        if (empty($line)) {
            return '';
        }

        $line = preg_replace(self::$regex, self::$html_template, $line);
        return $line;
    }
}


Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
29 Apr 2026 3.49 AM
raydofqv / raydofqv
0755
admin
--
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0755
api
--
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0755
forms
--
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0755
integrations
--
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0755
views
--
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0755
.htaccess
0.231 KB
8 Jun 2026 8.15 AM
raydofqv / raydofqv
0555
class-container.php
3.014 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
class-debug-log-reader.php
2.817 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
class-debug-log.php
6.459 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
class-dynamic-content-tags.php
7.586 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
class-field-formatter.php
4.323 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
class-field-guesser.php
3.48 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
class-list-data-mapper.php
6.089 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
class-mailchimp-subscriber.php
1.751 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
class-mailchimp.php
16.778 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
class-personal-data-exporter.php
3.271 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
class-plugin.php
1.437 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
class-queue-job.php
0.524 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
class-queue.php
4.018 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
class-tools.php
8.472 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
default-actions.php
0.111 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
default-filters.php
0.877 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
deprecated-functions.php
0.006 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644
functions.php
14.854 KB
16 Mar 2026 4.43 PM
raydofqv / raydofqv
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF Static GIF