<html>
<header>

<!-- You can load a local copy of jQuery, or load it from Google -->
<script src="https://www.google.com/jsapi" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>


<!-- Load the AOA javaScript functions from where you installed AOA -->
<script type='text/javascript' src='https://www.YOURSITE.com/ad-overlay-anything/js/aoa-functions.js'></script>

<!-- Set the AOA javaScript variables only if using these options -->
<script type='text/javascript'>
/* <![CDATA[ */
var AoaCloseTimer = "5";	/* Hide the Close button/text on Ads for X seconds */
var AoaCloseAfter = "60";	/* Close Ads automatically after X seconds */
/* ]]> */
</script>

<!-- Load the AOA style sheet -->
<link href='https://www.YOURSITE.com/ad-overlay-anything/css/style.css' rel='stylesheet' type='text/css'/>

</header>
<body>
<h1>AOA Example with PHP</h1>

<!-- The overlay will automatically fill the parent container, so set this parent container to the width of the video. -->
<div style='width: 640px;'>

<?php

/* Require the AOA code from where you installed AOA */
require_once( sprintf( "%s/ad-overlay-anything/aoa.php", dirname(__FILE__) ) );

/* Set the variables to use for an Ad Overlay: */
$ad = array(
		'content'	=> '<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Sidebar 250x250 --> <ins class="adsbygoogle" style="display:inline-block;width:250px;height:250px" data-ad-client="ca-pub-4147479728045447" data-ad-slot="7950969153"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>',
		'class'		=> 'myCustomClass',
		'close'		=> 'Close Ad',
		'percent'	=> '100',
		'cookie'	=> '0',
);


/* Set the string variable of what will be wrapped in the Ad Overlay: */
$wrap = '<iframe width="640" height="360" src="https://www.youtube.com/embed/DNPto4GFwx4?feature=oembed" frameborder="0" allowfullscreen></iframe>';

/* Call the AOA function to return a string with the wrap content and the Ad Overlay. */
$str = aoa_wrap( $ad, $wrap );

/* Display the wrap content and the Ad Overlay */
echo $str;
?>

</div>

</body>
</html>
