Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- include "dbcon/config.php";
- if(isset($_COOKIE['ref_link'])){
- $ref = $_COOKIE['ref_link'];
- }else{
- $ref = rand(1,9).date('Y').date('m').date('d').date('h').date('i').date('s');
- $ref = rand_uniqid($ref);
- setcookie("ref_link",$ref, 9999999999);
- $insert = "insert into cookie_ref(REF_val) values('".$ref."');";
- @mysql_query($insert);
- }
- $error = ''; //used for checking if ip has been re used
- if(isset($_GET['ref'])){
- $getip = "select * from cookie_ref_ips where IP_address = '".getRealIpAddr()."' and REF_val = '".$_GET['ref']."'";
- $getip_query = @mysql_query($getip);
- if(@mysql_num_rows($getip_query) < 1){
- $update = "update cookie_ref set REF_hits = REF_hits + 1 where REF_val = '".$_GET['ref']."'";
- @mysql_query($update);
- $insertip = "insert into cookie_ref_ips(IP_address,REF_val) values('".getRealIpAddr()."','".$_GET['ref']."')";
- @mysql_query($insertip);
- }else{
- $error = "<h1>Već ste posjetili ovaj link sa svoje IP Adrese!</h1>";
- }
- }
- ?>
- <!DOCTYPE html>
- <html>
- <head profile="http://www.w3.org/2005/10/profile">
- <title>Besplatni Premium Minecraft Accounti sa SQ!</title>
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
- <!-- SEO OPTIMISATION -->
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
- <meta name="keywords" content="minecraft,premium,accounti,akaunti,free,besplatno,giveaway,nagrada,premium akaunt,akaunti sa sq,minecraft akaunti">
- <meta name="description" content="Besplatni Premium Accounti sa SQ.Napravite vas vlastiti account u roku od par minuta!">
- <!-- EXTRA SEO -->
- <meta property="og:title" content="Besplatni Premium Minecraft Accounti sa SQ!"/>
- <meta property="og:description" content="Nasa webstranica sluzi za pravljenje Minecraft accounta sa SQ besplatno. Ako zelite premium account, Posjetite nas website!"/>
- <!-- OG Seo -->
- <meta name="author" content="Mojang AB Original">
- <meta property="og:image" content="wwww.minecraft-balkan.com/img/thumb.jpg" />
- <meta property="og:url" content="Minecraft.net" />
- <!-- CSS Fajlovi -->
- <link href="css/style.css" rel="stylesheet">
- </head>
- <body>
- <center>
- <a href="http://www.minecraft-balkan.com"><img src="img/logo.png" alt="Besplatni Premium Accounti!"/></a>
- </center>
- <div class="container">
- <ol class="progress-meter">
- <li class="progress-point done">Kreiranje Racuna</li><li class="progress-point todo">05:10 mins</li><li class="progress-point todo">Link</li><li class="progress-point todo">Connect</li>
- </ol>
- </div>
- <div class="box">
- <center>
- <h2>
- <?
- echo $error;
- $select = "select * from cookie_ref where REF_val = '".$ref."';";
- $selectQuery = @mysql_query($select);
- $selectArray = @mysql_fetch_array($selectQuery);
- $hits = $selectArray['REF_hits'];
- echo "Ukupan broj Klikova: ".$hits;
- ?>
- </h2>
- <?
- if($hits > 4){
- ?>
- <div id="winner">
- <h3>Uspjesno! Doveli ste 5 Prijatelja, sada mozemo nastaviti!</h3>
- <a href="potvrda.html" class="myButton">Nastavi</a>
- </div>
- <?
- }
- ?>
- <br />
- <div style="width:100%;" id="inner-content">
- <p> Vas link</p>
- <p></p>
- <input type="text" name="FirstName" value="http://minecraft-balkan.com/?ref=<? echo $ref; ?>"><br>
- <p>Da bi ste otkljucali sljedecu stranicu morate dovesti 5 Vasih prijatelja na ovaj link</p>
- <h6> Copyright© 2015 - Minecraft-Balkan.com </h6>
- </center>
- </div>
- </body>
- </html>
- <?
- function rand_uniqid($in, $to_num = false, $pad_up = false, $passKey = null)
- {
- $index = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- if ($passKey !== null) {
- // Although this function's purpose is to just make the
- // ID short - and not so much secure,
- // you can optionally supply a password to make it harder
- // to calculate the corresponding numeric ID
- for ($n = 0; $n<strlen($index); $n++) {
- $i[] = substr( $index,$n ,1);
- }
- $passhash = hash('sha256',$passKey);
- $passhash = (strlen($passhash) < strlen($index))
- ? hash('sha512',$passKey)
- : $passhash;
- for ($n=0; $n < strlen($index); $n++) {
- $p[] = substr($passhash, $n ,1);
- }
- array_multisort($p, SORT_DESC, $i);
- $index = implode($i);
- }
- $base = strlen($index);
- if ($to_num) {
- // Digital number <<-- alphabet letter code
- $in = strrev($in);
- $out = 0;
- $len = strlen($in) - 1;
- for ($t = 0; $t <= $len; $t++) {
- $bcpow = bcpow($base, $len - $t);
- $out = $out + strpos($index, substr($in, $t, 1)) * $bcpow;
- }
- if (is_numeric($pad_up)) {
- $pad_up--;
- if ($pad_up > 0) {
- $out -= pow($base, $pad_up);
- }
- }
- $out = sprintf('%F', $out);
- $out = substr($out, 0, strpos($out, '.'));
- } else {
- // Digital number -->> alphabet letter code
- if (is_numeric($pad_up)) {
- $pad_up--;
- if ($pad_up > 0) {
- $in += pow($base, $pad_up);
- }
- }
- $out = "";
- for ($t = floor(log($in, $base)); $t >= 0; $t--) {
- $bcp = bcpow($base, $t);
- $a = floor($in / $bcp) % $base;
- $out = $out . substr($index, $a, 1);
- $in = $in - ($a * $bcp);
- }
- $out = strrev($out); // reverse
- }
- return $out;
- }
- function getRealIpAddr()
- {
- if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet
- {
- $ip=$_SERVER['HTTP_CLIENT_IP'];
- }
- elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy
- {
- $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
- }
- else
- {
- $ip=$_SERVER['REMOTE_ADDR'];
- }
- return $ip;
- }
- ?>
Add Comment
Please, Sign In to add comment