PHP code example of mimmi20 / modernizr-server
1. Go to this page and download the library: Download mimmi20/modernizr-server 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/ */
mimmi20 / modernizr-server example snippets
use ModernizrServer\Modernizr;
Modernizr::init();
if (null === Modernizr::getData()) {
print "<html><head><script type='text/javascript'>";
print Modernizr::buildJsCode() . "</script></head><body></body></html>";
exit;
}
print 'The server knows:';
foreach (Modernizr::getData() as $feature => $value) {
print "<br/> $feature: ";
print_r($value);
}