Advertisement
dimaslanjaka

cURL

Nov 3rd, 2017
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.42 KB | None | 0 0
  1. <?php
  2. //header("Cache-Control: no-cache, must-revalidate");
  3. header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
  4. //header("Pragma: no-cache");
  5. header("Refresh: 60");
  6. //header("Content-Type: application/xml; charset=utf-8");
  7. date_default_timezone_set('Asia/Jakarta');
  8.    
  9.     $date = date('Y-m-d_H:i:s');
  10.     $md5 = md5($date);
  11.     $param = 'date='.$date.'&hash='.$md5;
  12.     $current = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
  13.     $a = ['https://www.webmanajemen.xyz/p/adrotator.html?ref=otohits&'.$param.'', 'https://www.kompiajaib.com/?'.$param.'', 'https://www.arlinadzgn.com/?'.$param.''];
  14.     $website = $a[mt_rand(0, count($a) - 1)];
  15.     $referer = $a[mt_rand(0, count($a) - 1)];
  16.     $proxy = '87.98.157.190:80';
  17.  
  18.     echo http_get_contents($proxy, $_GET['u'], $referer);
  19.    // echo http_get_contents($_GET['u']);
  20.  
  21.     function http_get_contents($proxy, $url, $referer) {
  22.  
  23.         $headers[] = 'Accept: */*';
  24.         $headers[] = 'Connection: Keep-Alive';
  25.        // $headers[] = 'Host: deloton.com';
  26.        // $headers[] = 'Origin: http://deloton.com';
  27.         $headers[] = 'Content-type: */*;charset=UTF-8';
  28.         $useragent = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)';
  29.  
  30.         $process = curl_init($url);
  31.         if (isset($proxy)) {
  32.         curl_setopt($process, CURLOPT_PROXY, $proxy);
  33.         }
  34.         curl_setopt($process, CURLOPT_HTTPHEADER, $headers);
  35.         curl_setopt($process, CURLOPT_HEADER, 0);
  36.         curl_setopt($process, CURLOPT_USERAGENT, $useragent);
  37.         curl_setopt($process, CURLOPT_REFERER, $referer);
  38.         curl_setopt($process, CURLOPT_TIMEOUT, 30);
  39.         curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);
  40.         curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1);
  41.  
  42. if(FALSE === ($retval = curl_exec($process))) {
  43.     error_log(curl_error($process));
  44.   } else {
  45.     return $retval;
  46.   }
  47.        // $return = curl_exec($process);
  48.       //  curl_close($process);
  49.  
  50.        // return $return;
  51.     }
  52.  
  53. ?>
  54. <script>
  55. setTimeout(function(){
  56.    window.location.reload(1);
  57. }, 60000);
  58. </script>
  59. <noscript> <meta http-equiv="refresh" content="60; URL=<?php echo $current; ?>">
  60. </noscript>
  61. <center>
  62. <a href="<?php echo $_GET['u']; ?>" rel="nofollow" title="<?php echo $_GET['u']; ?>" class="w3-btn w3-teal btn button" id="refresh">Go To The Url</a>
  63. </center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement