BVB Source Codes

Vehicle AdLogger v1.4.0 shu han edition Show wrapping.php Source code

Return Download Vehicle AdLogger v1.4.0 shu han edition: download wrapping.php Source code - Download Vehicle AdLogger v1.4.0 shu han edition Source code - Type:.php
  1. <?php
  2. /*#################################################################################
  3.         AdLogger
  4.         - An open-source tracking tool for preventing click fraud
  5.  
  6.         Copyright 2006 by Trevor Fitzgerald
  7.         http://www.adlogger.org
  8.  
  9.         This program is free software; you can redistribute it and/or
  10.         modify it under the terms of the GNU General Public License
  11.         as published by the Free Software Foundation; either version 2
  12.         of the License, or (at your option) any later version.
  13.  
  14.         This program is distributed in the hope that it will be useful,
  15.         but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.         GNU General Public License for more details.
  18.  
  19.         You should have received a copy of the GNU General Public License
  20.         along with this program; if not, write to the Free Software
  21.         Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  22.  
  23.         If you find this script useful, please share it with others!
  24.  
  25.         Thank you!
  26. */#################################################################################
  27. ?>
  28.  
  29.         <h1 id="phpcode">PHP封装代码</h1>
  30.         <p>将你的 Google AdSense 代码输入到左边文本框中, 点击生成, 程序会在 Adsense 代码外围生成一小段 PHP 代码, 这段代码能够阻拦特定浏览者.</p>
  31.         <p>*提示: <br />1.生成的代码不会影响到 Adsense 代码, 只是在外围生成了一小段用于跟踪的 PHP 代码, Google Adsense代码还是完整不变的(符合 Google Adsense 计划政策).<br />2.生成的代码只能运行于PHP环境, 其他环境下请选择JavaScript跟踪代码.</p>
  32.         <p>使用PHP封装代码, 可以阻拦指定IP, IP段, 和一定时间内多次点击广告的浏览者. 您还可以选择当浏览者被阻拦后, 代替显示的广告, 可以是文本, JavaScript, 或 HTML 代码.</p>
  33.         <p><a href="./manage.php?settings">点击这里</a> 对防止恶意点击参数进行设置.</p>
  34.  
  35. <form name="originalAdCode" id="originalAdCode" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>#phpcode">
  36.  
  37.                         <fieldset>
  38.                         <legend>PHP封装代码</legend>
  39.  
  40. <table summary="wrapping-gen" width="100%" align="center">
  41. <tbody>
  42. <tr>
  43. <td align="center">
  44.                                 <strong>您的 AdSense 代码:</strong>
  45.                                 <br />
  46.                                 <textarea name="originalAdSenseCode" cols="30" rows="15" onclick="this.select();"><?php if (isset($_POST['originalAdSenseCode'])) { echo stripslashes($_POST['originalAdSenseCode']); } else { echo "[Enter your AdSense Code Here]"; } ?></textarea>
  47.                                 <br />
  48.                                 <strong>代替广告代码:</strong> (可选)
  49.                                 <br />
  50.                                 <textarea name="alt_ad_code" cols="30" rows="5" onclick="this.select();"><?php if (isset($_POST['alt_ad_code']) && !empty($_POST['alt_ad_code'])) { echo stripslashes($_POST['alt_ad_code']); } ?></textarea>
  51.  
  52. </td>
  53. <td align="center">
  54.                                 <input type="hidden" name="posted" value="true" />
  55.                                 <input type="submit" name="Submit" value="生成 &raquo;" />
  56. </td>
  57.  
  58.  
  59.  
  60. <td align="center">
  61.                                 <strong>复制以下代码到网页中:</strong>
  62.                                 <br />
  63.  
  64. <?php
  65. /*
  66.  * If the user is trying to generate PHP Wrapping code,
  67.  * perform this code
  68.  */
  69. if (isset($_POST['posted'])) {
  70.  
  71. $originalAdSenseCode = stripslashes($_POST['originalAdSenseCode']);
  72. $alt_ad_code = stripslashes($_POST['alt_ad_code']);
  73.  
  74. $phpopen = <<<EOD
  75. <!-- Start AdLogger Wrapping Code -->
  76. <?php @include_once("$adlogger_doc_path/track/ad_check.php"); if (\$show_ads) { ?>
  77.  
  78.  
  79. EOD;
  80.  
  81. /*
  82.  * If the user specified an alternate ad to be displayed,
  83.  * go ahead and add it to the generated code.
  84.  */
  85. if (!empty($alt_ad_code)) {
  86.  
  87. $phpclose = <<<EOD
  88.  
  89.  
  90. <?php } else { ?>
  91.  
  92. $alt_ad_code
  93.  
  94. <?php } ?>
  95. <!-- End AdLogger Wrapping Code -->
  96. EOD;
  97.  
  98. /*
  99.  * Otherwise, just go ahead and close the generated code.
  100.  */
  101.  
  102. } else {
  103.  
  104. $phpclose = <<<EOD
  105.  
  106.  
  107. <?php } ?>
  108. <!-- End AdLogger Wrapping Code -->
  109. EOD;
  110.  
  111. }
  112.  
  113. ?>
  114.  
  115. <textarea name="newAdsenseCode" cols="40" rows="20" onclick="this.select();" readonly="readonly">
  116. <?php echo $phpopen . $originalAdSenseCode . $phpclose; ?>
  117. </textarea>
  118. <?php } else { ?>
  119. <textarea name="newAdsenseCode" cols="40" rows="20" onclick="this.select();" readonly="readonly"></textarea>
  120. <?php } ?>
  121. </td>
  122. </tr>
  123. </tbody>
  124. </table>
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                         </fieldset>
  131.  
  132. </form>
downloadwrapping.php Source code - Download Vehicle AdLogger v1.4.0 shu han edition Source code
Related Source Codes/Software:
Flash voting system v1.2 - Modify the localization program abroad 2016-09-05
HpAdsNew v2.09 pr1 CMSware localization version - Can use it to build DoubleClick that third-party a... 2016-09-05
The Advanced Poll v2.08 multilingual version - Can set up multiple support voting procedures, can... 2016-09-05
Search (PHP edition v1.0 voting system - Search (PHP edition V1.0 voting system functions a... 2016-09-05
PHP character images online voting system v1.0.1 - The tripod with two handles peak network voting sy... 2016-09-04
Openads v2.0.11 multilingual version - A banner AD using PHP development management and t... 2016-09-05
Angel Upload Manager v1.0 - Ablog author works. Many friends asked me to, I wi... 2016-09-05
Good mood multi-user v1.1 news system - Function description: 2016-09-05
V2.0 prodigal news system - 1, article categories: unlimited categories, and i... 2016-09-05
PHPNovelС˵ϵͳv4.0.6 - PHPNovel is a set of using PHP + mysql database op... 2016-09-05
mockery - Mockery is a simple yet flexible PHP mock object f... 2017-03-31
redisson - Redisson - distributed Java objects and services (... 2017-03-31
flow.js - A JavaScript library providing multiple simultaneo... 2017-03-31
Google-Maps-for-Rails - Enables easy Google map + overlays creation in Rub... 2017-03-31
DCIntrospect - Small library of visual debugging tools for iOS. 2017-03-31
Mining-the-Social-Web-2nd-Edition - The official online compendium for Mining the Soci... 2017-03-31
TensorFlow-Book - Accompanying source code for Machine Learning with... 2017-03-31
js-interview-review - The JS interview review. As I'm reviewing several ... 2017-03-31
script.js - Asyncronous JavaScript loader and dependency manag... 2017-03-31
dex-method-counts - Command-line tool to count per-package methods in ... 2017-03-31

 Back to top