Advertisement
verrary

Redirect

Jan 15th, 2015
505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.96 KB | None | 0 0
  1. <?php  //echo $_SERVER['QUERY_STRING'].'<br/>';
  2. ini_set("display_errors", 1);
  3. ini_set("display_errors", 1);
  4. ini_set("track_errors", 1);
  5. ini_set("html_errors", 1);
  6. error_reporting(E_ALL);//u/33
  7. include($_SERVER["DOCUMENT_ROOT"].'/wp-config.php');
  8. global $table_prefix, $wpdb;
  9. $get_id = $_SERVER['QUERY_STRING'];
  10. $get_id = str_replace ("g", "",str_replace ("|", "", $get_id));
  11.  
  12. $pieces = explode("|", $get_id);$get_id = $pieces[0];
  13. $variables = $pieces[1];
  14. $table_name = $table_prefix."postmeta";
  15.  
  16. if($get_id)
  17. {
  18. $site_redirect =
  19. $wpdb->get_var("SELECT meta_value FROM $table_name WHERE post_id='$get_id' AND meta_key='DownloadOG' ");
  20.  
  21. $title =
  22. $wpdb->get_var("SELECT p.post_title FROM wp_posts p  WHERE  p.id = '$get_id' ");
  23.  
  24.  
  25. if(empty($site_redirect))
  26. $site_redirect = get_home_url().'/programs/'.$wpdb->get_var("SELECT meta_value FROM $table_name WHERE post_id='$get_id' AND meta_key='File' ");
  27.  
  28.  
  29. if($site_redirect)
  30. {
  31.  
  32. $site_redirect = str_replace("$2", $variables, $site_redirect);
  33.  
  34. echo '<html xmlns="http://www.w3.org/1999/xhtml"  dir="rtl" lang="ar">
  35. <header>
  36. <META http-equiv="content-type" content="text/html; charset=UTF-8"/>
  37. <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
  38. <title> رابط تحميل '.$title.' تحميل برنامج   </title>
  39. <style>
  40. #dlink{display:none;z-index:0;}
  41. #timer,#dlink{font-size:25px;}
  42. #dlink{position:relative; right:25%;}
  43. #timer{position:relative; right:28%;}
  44. #___plusone_0{position:relative;right:26%;background:url("/download-button.gif") no-repeat center center!important;height:13px!important;padding:0px!important;}
  45. #___plus_0{position:relative; right:10%;}
  46. .kt,.qwa{color:white!important;font: 22px/1 arial,sans-serif!important;}
  47. #button,.Po{width:90px!important;height:40px!important;}
  48. </style>';
  49. $str = <<<MAR
  50. MAR;
  51. echo $str;
  52. echo '<script type="text/javascript">
  53. var count=8;
  54. var counter=setInterval(timer, 1000); //1000 will  run it every 1 second
  55. function timer() {   count=count-1;   if (count <= 0)   {      clearInterval(counter);      return;   } } function timer() {   count=count-1;   if (count <= 0)   {      clearInterval(counter);      return;   }  document.getElementById("timer").innerHTML=count + ""; }
  56. </script>
  57. </header><body> ';
  58.  
  59. echo 'تحميل برنامج تحميل برامج برامج مجانية برامج كمبيوتر';
  60.  
  61. $str = <<<MARKER
  62. <br/>
  63. <a href="http://downloadbrnamj.com"   >
  64. <img src="http://downloadbrnamj.com/downloadbrnamj.jpg" /></a>
  65. <h1>$title</h1>
  66. جاري تحويلك الى صفحة التحميل خلال 5 ثواني
  67. <br/>
  68. <span id="timer"></span>
  69. <script type="text/javascript">
  70. setInterval(function(){document.getElementById("dlink").style.display="inline-block"},8000);
  71. </script>
  72. <br/>
  73. <a id="dlink" href="$site_redirect"  rel="nofollow" targ-="_blank">رابط التحميل </a>
  74. <br/>
  75.  
  76.  
  77. <!-- Place this tag in your head or just before your close body tag. -->
  78. <script src="https://apis.google.com/js/platform.js" async defer>
  79.   {lang: 'ar'}
  80. </script>
  81.  
  82. <!-- Place this tag where you want the +1 button to render. -->
  83. <div class="g-plusone" data-size="tall" data-href="http://programsdownload.org/"></div>
  84.  
  85.  
  86.  
  87.  
  88. <!-- Place this tag in your head or just before your close body tag. -->
  89. <!-- <script type="text/javascript" src="https://apis.google.com/js/plusone.js">
  90.   {lang: 'ar'}
  91. </script> -->
  92.  
  93. <!-- Place this tag where you want the badge to render. -->
  94. <!-- <div class="g-plus" data-width="269" data-height="69" data-href="https://plus.google.com/105432889621861101424" data-rel="author"></div> -->
  95.  
  96. <br/>
  97. <!-- Place this tag where you want the +1 button to render. -->
  98. <!-- <div class="g-plusone" data-annotation="inline" data-width="140"  data-height="92" data-size="tall" data-href="http://downloadbrnamj.com/"></div> -->
  99. <!-- Place this tag after the last +1 button tag. -->
  100. <!-- <script type="text/javascript">
  101.   window.___gcfg = {lang: 'ar'};
  102.   (function() {
  103.     var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
  104.     po.src = 'https://apis.google.com/js/plusone.js';
  105.     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  106.   })();
  107. </script> -->
  108.  
  109. MARKER;
  110. echo $str;
  111. echo '<p style="text-alin:center;margin:50px;font-size:16px;">
  112. <a href="http://downloadbrnamj.com/">الرجوع الى تحميل برنامج </a>  | |
  113. <a href="#" onclick="window.location.href = document.referrer;">الرجوع الى الصفحة السابقة </a>
  114. </p>';
  115. //echo '<META http-equiv="refresh" content="5;URL='.$site_redirect.'"> ';
  116. echo '
  117. <!-- Histats.com  START (hidden counter)-->
  118. <script type="text/javascript">document.write(unescape("%3Cscript src=%27http://s10.histats.com/js15.js%27 type=%27text/javascript%27%3E%3C/script%3E"));</script>
  119. <a href="http://www.histats.com  rel="nofollow"" target="_blank" title="free stats" ><script  type="text/javascript" >
  120. try {Histats.start(1,2871681,4,0,0,0,"");
  121. Histats.track_hits();} catch(err){};
  122. </script></a>
  123. <noscript><a href="http://www.histats.com  rel="nofollow"" target="_blank"><img  src="http://sstatic1.histats.com/0.gif?2871681&101" alt="free stats" border="0"></a></noscript>
  124. <!-- Histats.com  END  -->
  125. </body></html>';
  126. //header("Location: $site_redirect");
  127. exit;
  128. }
  129. echo '<html xmlns="http://www.w3.org/1999/xhtml"  dir="rtl" lang="ar"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>';
  130. echo '<title> رابط تحميل برنامج  </title> ';
  131. echo '<div  style="text-alin:center;margin:120px;" >
  132. <h2 style="text-alin:center;">الرابط  لم يتم العتور عليه </h2>';
  133. echo '<p>
  134. يبدو انك ادخلت رابط غير سحيح جاري اعادتك الى الصفحة الرئيسية   <br/>
  135. <a href="http://downloadbrnamj.com/">تحميل برنامج </a> </p></div>';
  136. //echo '<META http-equiv="refresh" content="3;URL=http://downloadbrnamj.com/"> ';
  137.  
  138. } ?>
  139.  
  140.  
  141. .htaccess
  142. RewriteRule ^g/([0-9]+)$ g.php?$1|$2
  143. nginx
  144. location /u { try_files $uri $uri/ /u.php?$uri;  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement