code1- <?php
- $site2 = "http://www.site2.com/";
- echo "<body onload="javascript:frmClickTracking.submit();">";
- echo "<form action="" . $site2 . "" method="post" name="frmClickTracking">";
- echo "</form>";
- ?>
复制代码 code2- <?php
- $site1 = "http://www.site1.com/";
- $thissite = "http://yourblogname.com/appropriatepost.html";
- $affiliate_link = "http://www.youroffer.com";
- if($_SERVER['HTTP_REFERER'] == $site1)
- {
- echo "<body onload="javascript:frmClickTracking.submit();">";
- echo "<form action="" . $affiliate_link . "" method="post" name="frmClickTracking">";
- echo "</form>";
- }
- elseif ($_SERVER['HTTP_REFERER'] == $thissite)
- {
- echo "We're sorry there was a problem with the server. Please click this link.";
- echo "<a href="http://youraffiliatelink.com">click here<a>";
- }
- else
- echo "<META http-equiv="refresh" content="0;URL=http://www.yourafflink.com"> ";
- ?>
复制代码 |