php广告加载类用法实例(2)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title> AD Loader </title> <style type="text/css"> .banner1{margin:10px; border:1px solid #CCCCCC; width:728px; height:90px;} .banner2{margin:10px; border:1px solid #CCCCCC; width:300px; height:250px;} </style> <script type="text/javascript" src="https://code.jquery.com/jquery-1.10.1.min.js"></script> </head> <body> <div></div> <div></div> <div></div> <?php function showAD($channel='', $step='', $async=''){ include('ADLoader.class.php'); $ad_config = include('ADConfig.php'); ADLoader::setConfig($ad_config, 'ADLoader.js'); return ADLoader::load($channel, $step, $async); } echo showAD('case_openx'); // 异步加载 //echo showAD('case_url'); // url方式异步加载 //echo showAD('case_sync_openx', 300, false); // 同步加载 ?> </body> </html>

adurl.php文件如下:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/b30d08d8768cb493ae34a2b239736e96.html