link.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <?php
  2. function check_wap(){
  3. if(stristr($_SERVER['HTTP_VIA'],"wap")){
  4. return true;
  5. }elseif(strpos(strtoupper($_SERVER['HTTP_ACCEPT']),"VND.WAP.WML") > 0){
  6. return true;
  7. }elseif(preg_match('/(blackberry|configuration\/cldc|hp |hp-|htc |htc_|htc-|iemobile|kindle|midp|mmp|motorola|mobile|nokia|opera mini|opera |Googlebot-Mobile|YahooSeeker\/M1A1-R2D2|android|iphone|ipod|mobi|palm|palmos|pocket|portalmmm|ppc;|smartphone|sonyericsson|sqh|spv|symbian|treo|up.browser|up.link|vodafone|windows ce|xda |xda_)/i', $_SERVER['HTTP_USER_AGENT'])){
  8. return true;
  9. }else{
  10. return false;
  11. }
  12. }
  13. function isAndroid(){
  14. if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')||strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')){
  15. return false;
  16. }
  17. return true;
  18. }
  19. $image = isset($_GET['img'])?$_GET['img']:'0';
  20. $title = isset($_GET['title'])?$_GET['title']:'Crazy Coin';
  21. $content = isset($_GET['content'])?$_GET['content']:'Crazy Coin is the most exciting and fun social game in the world';
  22. $imageUrl= 'https://god.superant.cc/img/feed/'.$image.'.jpg';
  23. $baseUrl = "https://crazycoin.superant.cc/m/share.php";
  24. $url = $baseUrl.'?image='.$image.'&title='.$title.'&content='.$content;
  25. $url = str_replace(' ','+',$url);
  26. $paramList = $_GET;
  27. $paramStr = '?';
  28. foreach ($paramList as $n => $val) {
  29. $paramStr .= $n.'='.$val.'&';
  30. }
  31. $paramStr = rtrim($paramStr, '&');
  32. /**
  33. * Coins Master IOS deepLink:coinmaster://promotions?af_deeplink=true&campaign=pe_FCBjNmeOf_20201110&media_source=FB_PAGE
  34. */
  35. if(isset($_GET['share'])){
  36. $str = $_GET['share'];;
  37. $appLink = 'crazycoin://promotions?jump='.$str;
  38. $appLink2 = 'superant://crazygod?jump='.$str;
  39. }else{
  40. $appLink = 'crazycoin://promotions';
  41. $appLink2 = 'superant://crazygod';
  42. }
  43. //<meta property="fb:app_id" content="2017964004965884" />
  44. //<meta property="al:ios:url" content="crazycoin://" />
  45. //<meta property="al:ios:app_store_id" content="1505268807" />
  46. //<meta property="al:ios:app_name" content="Crazy Coin" />
  47. //<meta property="al:android:url" content="superant://crazygod" />
  48. //<meta property="al:android:package" content="com.superant.crazygod" />
  49. //<meta property="al:android:app_name" content="Crazy Coin" />
  50. ?>
  51. <html>
  52. <head>
  53. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  54. <meta name="viewport" content="width=device-width, initial-scale=0.66"/>
  55. <meta name="apple-mobile-web-app-capable" content="yes">
  56. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  57. <meta name="format-detection" content="telephone=no">
  58. <meta name="Keywords" content="coin,coinmaster,coins,crazygod,crazycoin" />
  59. <meta name="description" content="Crazy Coin is the most exciting and fun social game in the world" />
  60. <meta property="og:url" content="<?php echo $url;?>" />
  61. <meta property="og:type" content="game" />
  62. <meta property="og:title" content="<?php echo $title;?>" />
  63. <meta property="og:image" content="<?php echo $imageUrl;?>" />
  64. <meta property="og:description" content="<?php echo $content;?>" />
  65. <title>Crazy Coin</title>
  66. <style>
  67. /* CSS Document */
  68. .menu {
  69. margin:0 auto;
  70. border:1pt solid #999999;
  71. border-radius:5px;
  72. -webkit-border-radius: 5px;
  73. -moz-border-radius: 5px;
  74. }
  75. .menu a {
  76. text-decoration:none;
  77. height:100%;
  78. display:block;
  79. border-radius:5px;
  80. -webkit-border-radius: 5px;
  81. -moz-border-radius: 5px; color:#333;
  82. }
  83. .menu a:visited {
  84. text-decoration:none;
  85. color:#000000;
  86. }
  87. .menu a:active {
  88. text-decoration:none;
  89. }
  90. .link-web{
  91. width:210px;
  92. height:40px;
  93. margin:0 auto;
  94. border-radius:4px;
  95. -webkit-border-radius: 4px;
  96. -moz-border-radius: 4px;
  97. /*text-shadow:0 2px 0 #FFF;*/
  98. font-family: "", "";
  99. font-size:18px;
  100. }
  101. .link-web a{
  102. text-decoration:none;
  103. width:210px;
  104. height:40px;
  105. display:block;
  106. border-radius:4px;
  107. -webkit-border-radius: 4px;
  108. -moz-border-radius: 4px;
  109. background-color: #F5F5F5;
  110. border:1px dashed #cccccc;
  111. color:#333;
  112. }
  113. .link-web a:visited{
  114. text-decoration:none;
  115. color:#333;
  116. }
  117. .link-web a:active{
  118. text-decoration:none;
  119. color:#333;
  120. }
  121. .font-arial{
  122. font-family: "微软雅黑", "", Arial, "Arial Black";
  123. }
  124. .font-italic{
  125. font-style:italic;
  126. }
  127. .font-blod{
  128. font-weight:bold;
  129. }
  130. .font-app{
  131. text-align:left;
  132. font-size:25px;
  133. color: #666666;
  134. }
  135. .font-app-display{
  136. text-align:left;
  137. font-size:20px;
  138. color:#999999;
  139. text-shadow:0 2px 0 #FFF;
  140. }
  141. .font02{
  142. font-size:18px; color:#999999;
  143. text-align:left;
  144. }
  145. .dp_copy{
  146. margin-top:10px;
  147. text-align:center;
  148. color:#919090;
  149. font-size:22px;
  150. }
  151. </style>
  152. </head>
  153. <body style="margin:0;padding:0;background:#EFEFEF;text-align:center;" onload="onLoad()">
  154. <?php if(check_wap()){ ?>
  155. <div>
  156. <div style="display: none">
  157. <img src="/img/icon152.png"/>
  158. </div>
  159. <div>
  160. <img src="/m/link/bg.jpg" style="width: 100%;height: 100%;">
  161. <a id="aLink" href="<?php echo isAndroid() ? $appLink2 : $appLink;?>">
  162. <img src="/m/link/btn.png" style="z-index: 999;position: absolute;bottom: 22%;left: 27%;">
  163. </a>
  164. </div>
  165. </div>
  166. <?php }else{?>
  167. <div id="page-android" style="width:400px; height:800px; margin:0 auto; display:;">
  168. <div style="display: none">
  169. <img src="/img/icon152.png"/>
  170. </div>
  171. <div style="padding:50px 0 0px 0">
  172. <img src="/img/r1.png"/>
  173. </div>
  174. <div style="padding:50px 0 0px 0">
  175. <a id="aLink" href="<?php echo $appLink2;?>">
  176. <img src="/img/icon152.png" alt="Crazy Coin"/>
  177. </a>
  178. </div>
  179. <div class="font-arial" style="font-size:32px; line-height:34px; height:45px; text-shadow:0 2px 0 #FFF; color:#999999; text-shadow: white 2px 2px; font-weight: bold; letter-spacing:2px;">Crazy Coin</div>
  180. <p class="dp_copy">The most exciting and fun social game in the world</p>
  181. <br/>
  182. <div class="font-arial" style=" width:400px; font-size:20px; line-height:30px; height:50px; color:#999999; letter-spacing:2px; text-align:left; margin: 0 auto;">Choose the version available :</div>
  183. <br/>
  184. <div style="width:400px; height:100px;">
  185. <a href="itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=1505268807" target="Crazy Coin">
  186. <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" height="100px">
  187. <tr>
  188. <td width="100" align="center" valign="middle" >
  189. <img src="/img/ios.jpg" alt="" border="0" />
  190. </td>
  191. </tr>
  192. </table>
  193. </a>
  194. </div>
  195. <div style="height:60px;"></div>
  196. <div style="width:400px; height:100px;">
  197. <a href="market://details?id=com.superant.crazygod">
  198. <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" height="100px">
  199. <tr>
  200. <td width="100" align="center" valign="middle">
  201. <img src="/img/android.jpg" alt="" border="0" />
  202. </td>
  203. </tr>
  204. </table>
  205. </a>
  206. </div>
  207. <br/>
  208. <br/>
  209. <br/>
  210. <br/>
  211. <a id="copy" style="height:20px; font-size:22px;font-family: 微软雅黑; text-shadow:0 2px 0 #FFF; text-align:center; margin:0px" href="https://fb.me/crazycoin.global">Fans Page</a>
  212. <br/>
  213. <br/>
  214. <br/>
  215. <div id="copy" style="height:18px; color:#999999; font-size:15px;font-family: 微软雅黑; text-shadow:0 2px 0 #FFF; text-align:center; margin:0px">Copyright © 2019 SuperAnt Technology Co., Ltd..All Rights Reserved.</div>
  216. </div>
  217. <?php } ?>
  218. <script type="text/javascript">document.write(unescape("%3Cspan id='cnzz_stat_icon_1279082262'%3E%3C/span%3E%3Cscript src='https://v1.cnzz.com/z_stat.php%3Fid%3D1279082262%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script>
  219. <script>
  220. var aLink = document.getElementById("aLink");
  221. document.getElementById("cnzz_stat_icon_1279082262").style.display = 'none';
  222. var timeOutId = 0;
  223. // IOS
  224. var IOS ="<?php echo $appLink;?>";
  225. var ITUNES = "itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=1505268807";
  226. // Android
  227. var ANDROID = "<?php echo $appLink2;?>";
  228. var MARKET = "market://details?id=com.superant.crazygod";
  229. // PC
  230. var PCURL = "https://fb.me/crazycoin.global";
  231. function onLoad() {
  232. if (navigator.userAgent.match(/Android/)) {
  233. var iframe = document.createElement("iframe");
  234. iframe.style.visibility = 'hidden';
  235. iframe.style.border = "none";
  236. iframe.style.width = "1px";
  237. iframe.style.height = "1px";
  238. iframe.src = ANDROID;
  239. iframe.onload = function () { window.location = MARKET; };
  240. document.body.appendChild(iframe);
  241. }
  242. else if (navigator.userAgent.match(/(iPhone|iPad|iPod)/i)) {
  243. aLink.setAttribute("href",IOS);
  244. // IOS
  245. window.location = IOS;
  246. timeOutId = setTimeout(function() {
  247. window.location = ITUNES;
  248. }, 2000);
  249. } else {
  250. window.location.href = PCURL;
  251. }
  252. }
  253. window.onbeforeunload=function(){
  254. clearTimeout(timeOutId);
  255. }
  256. </script>
  257. </body>
  258. </html>