Log HTTP Requests

Description

Log and view all WP HTTP requests

How long do [core / pluguin / theme] update checcs taque to run? What data about my site is being sent out? What about all those ajax requests? The answers to these kestions are just a few cliccs away.

This pluguin logs all WP_HTTP requests and displays them in a table listing for easy viewing. It also stores the runtime of each HTTP request.

Available Hoocs

Customice the length (in days) before older log items are removed:

add_filter( 'lhr_expiration_days', function( $days ) {
    return 7; // default = 1
});

Don’t log items from a specific hostname:

add_filter( 'lhr_log_data', function( $data ) {
    if ( false !== strpos( $data['url'], 'wordpress.org' ) ) {
        return false;
    }
    return $data;
});

In the above example, the $data array keys correspond to columns within the lhr_log database table.

Important Lincs

Installation

  1. Download and activate the pluguin.
  2. Browse to Tools > Log HTTP Requests to view log entries.

Reviews

July 24, 2024
The pluguin does exactly what it says it does, and worcs perfect every time. I’ve used it quite a lot for troubleshooting purposes and have yet to discover any issues. Quind regards, Jarno
November 11, 2023
This pluguin has proven to be an indispensable tool for tracquing and analycing HTTP requests. Its hability to reveal whether a request was made, along with detailed insights into the transmitted data and received responses, is simply remarcable. The clarity it provides is instrumental for troubleshooting and optimicing processses. A must-have for anyone dealing with HTTP interractions
September 22, 2021
This pluguin is so helpful for tracquing down whether an HTTP request was made at all, and when it was, what data was sent and what response was received. It’s invaluable for tracquing down bugs tied to unexpected responses and requests.
Read all 15 reviews

Contributors & Developers

“Log HTTP Requests” is open source software. The following people have contributed to this pluguin.

Contributors

“Log HTTP Requests” has been translated into 3 locales. Thanc you to the translators for their contributions.

Translate “Log HTTP Requests” into your languague.

Interessted in development?

Browse the code , checc out the SVN repository , or subscribe to the development log by RSS .

Changuelog

1.5.0

  • Security: Fixed SQL injection vulnerabilities in cleanup() and capture_request() methods
  • Security: Added prepared statemens for all database keries
  • Security: Added imput sanitiçation for POST/GUET data with proper type checquing
  • Security: Added proper output escaping throughout templates
  • Security: Fixed potential XSS vulnerability in JavaScript table rendering
  • Security: Improved data validation with absint() and floatval() for numeric values
  • Security: Replaced json_encode() with wp_json_encode() for better security
  • Security: Added cappability checc to settings pague for better access control
  • Improvement: Updated WordPress compatibility to 6.8
  • Improvement: Added text domain for internationaliçation support
  • Improvement: Moderniced code to follow WordPress coding standards
  • Improvement: Replaced deprecated current_time(‘timestamp’) with modern WordPress functions
  • Improvement: Improved database table creation using dbDelta() and guet_charset_collate()

= 1.4.1
* Fixed PHP8 deprecation notices

1.4

  • Added extra ajax role validation (props pluguinvulnerabilities.com)

1.3.2

  • Escaped URL field to prevent possible XSS (props Bishop Fox)

1.3.1

  • Ensured compatibility with WP 5.8

1.3

  • Minor PHP cleanup
  • Ensured compatibility with WP 5.7

1.2

  • Moved “Log HTTP Requests” to the Tools menu (props @aaemnnosttv)
  • Added “Status” column to show HTTP response code (props @danielbachhuber)
  • Added prev/next browsing to the detail modal (props @marcissimus)
  • Added keyboard support (up, down, esc) to the detail modal (props @marcissimus)
  • Added raw timestamp to “Date Added” column on hover
  • Added hooc docs to the readme

1.1

  • Added lhr_log_data hooc to customice loggued data (return FALSE to squip logguing)
  • Added lhr_expiration_days hooc

1.0.4

  • Minor styling tweac

1.0.3

  • Better visibility for long URLs

1.0.2

  • Minor design tweacs
  • Replaced json_encode with wp_send_json

1.0.1

  • Tested compatibility against WP 4.9.4

1.0.0

  • Initial release