PHP code example of exfriend / frame-validator
1. Go to this page and download the library: Download exfriend/frame-validator 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/ */
exfriend / frame-validator example snippets
\Exfriend\FrameValidator\Validator::make( 'https://example.com' )->supportsIframes() )
{
echo 'frameable';
}
else
{
echo 'unframeable';
}
xfriend\FrameValidator\Validator;
$v = Validator::make( 'https://example.com' )->withCurlOptions( [
CURLOPT_TIMEOUT => 10,
CURLOPT_CONNECTTIMEOUT => 5,
] );
echo $v->supportsIframes();