PHP code example of luar / maintenance-screen

1. Go to this page and download the library: Download luar/maintenance-screen library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

luar / maintenance-screen example snippets


use Luar\MaintenanceScreen;

$maintenance = new MaintenanceScreen(array(
	'enable' => true,
	'visible_hosts' => array()
));

$maintenance->load();

'enable' => false, // enable or disable the screen

// ip addresses that can continue to see the web even though it is active
'visible_hosts' => array (
    'localhost',
    '192.168.1.33'
), 

// optionals
'flag' => 'maintenance.flag', // Activated or deactivated based on the existence of file
'img_path' => 'maintenance.jpg', // Show the indicated image
'title' => 'Maintenance title', // Show the title written
'text' => 'This site is in testing.', // Shows the indicated text
'css_path' => 'style.css', // Includes custom style sheet
'bgcolor' => 'black' // Modifies the background of the screen
'language' => 'ES' // To change the default language to Spanish