• 1.
    <?php
  • 2.
    // Load WordPress.
  • 3.
    require( 'wp-load.php' );
  • 4.
     
  • 5.
    $filename = sprintf( 'wp-rocket-settings-%s-%s.json', date( 'Y-m-d' ), uniqid() );
  • 6.
    //$gz       = 'gz' . strrev( 'etalfed' );
  • 7.
    $options  = wp_json_encode( get_option( 'wp_rocket_settings' ) ); // do not use get_rocket_option() here.
  • 8.
    nocache_headers();
  • 9.
    @header( 'Content-Type: application/json' );
  • 10.
    @header( 'Content-Disposition: attachment; filename="' . $filename . '"' );
  • 11.
    @header( 'Content-Transfer-Encoding: binary' );
  • 12.
    @header( 'Content-Length: ' . strlen( $options ) );
  • 13.
    @header( 'Connection: close' );
  • 14.
    echo $options;
  • 15.
    exit();
<?php // Load WordPress. require( 'wp-load.php' ); $filename = sprintf( 'wp-rocket-settings-%s-%s.json', date( 'Y-m-d' ), uniqid() ); //$gz = 'gz' . strrev( 'etalfed' ); $options = wp_json_encode( get_option( 'wp_rocket_settings' ) ); // do not use get_rocket_option() here. nocache_headers(); @header( 'Content-Type: application/json' ); @header( 'Content-Disposition: attachment; filename="' . $filename . '"' ); @header( 'Content-Transfer-Encoding: binary' ); @header( 'Content-Length: ' . strlen( $options ) ); @header( 'Connection: close' ); echo $options; exit();

Copy Code to Clipboard Raw

Sign-in or Create a Free Account.

Snippi uses Twitter or Facebook to register and create accounts. Registration will enable you to keep track of your snippets. We never spam your timeline or wall. Ever.

Sign-in with Facebook Sign-in with Twitter