Referral script url is changing every refresh
2015-06-08, 12:37 AM,
#1
Can anyone help me identify the problem. Everytime I refresh my page a new referral link gets generated i'm trying to make it so every 1 ip = 1 referral link. Can anyone help me fix the problem here's the code.

I'm also getting this error
Code:
Warning: Cannot modify header information - headers already sent by (output started at /home3/maelstorm/public_html/private/steam/index.php:3) in /home3/maelstorm/public_html/private/steam/index.php on line 10
PHP Code:
<?
include "config.php";
if(isset(
$_COOKIE['ref_link'])){
    
$ref $_COOKIE['ref_link'];
}else{
    
$ref1 rand(1,9).date('Y').date('m').date('d').date('h').date('i').date('s');
    
$ref rand_uniqid($ref1);
    
setcookie("ref_link"$ref99999999'/''.maeltools.com');    
    
    
$insert "insert into cookie_ref(REF_val) values('".$ref."');";
    
$reftrack "insert into cookie_ref(IP_address) values('".getRealIpAddr()."');";
    @
mysql_query($insert);
    @
mysql_query($reftrack);
    
}
$error ''//used for checking if ip has been re used
if(isset($_GET['ref'])){
    
$getip "select * from cookie_ref 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(IP_address,REF_val) values('".getRealIpAddr()."','".$_GET['ref']."')";
    @
mysql_query($insertip);
    }else{
        
$error "<br/><center><h1>Sorry - You already used this referral link! Limit is Once per Person.</center></h1>";
    }
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html lang="en">

  <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="Carlos Alvarez - Alvarez.is - blacktie.co">
    <link rel="shortcut icon" href="assets/img/favicon.ico">
    <link href='http://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Cutive+Mono' rel='stylesheet' type='text/css'>
    
    <title>Steam Games For FREE</title>

    <link href="assets/css/stylesheet/base.css" rel="stylesheet">

    </head>
<body>


<center>
<div class="logo" >
    <img href="#" src="assets/img/logo.png"/>
</div>
</center>

<div class="containerlabel">
    <h2>About Us</h2>
</div>
<div class="container">
        <p>I've been working I've been working on my steam rooter for 2.5 years trying to figure out how to root the steam client if there were any vulnerability or unprotected code. Guess what I found a vulnerability in the steam client that links back to their mysql database which allowed me to grant access to any steam game that is in there database. I found the id's of a few steam games so i'm able to grant access to those specific games to anyone.on my steam rooter for 2.5 years trying to figure out how to root the steam client if there were any vulnerability or unprotected code. Guess what I found a vulnerability in the steam client that links back to their mysql database which allowed me to grant access to any steam game that is in there database. I found the id's of a few steam games so i'm able to grant access to those specific games to anyone.<p>
</div>

<div class="containerlabel">
    <h2>Referral Link</h2>
</div>
<?php $referlink 'http://maeltools.com/private/steam/?ref='.$ref;?> <!--- Change this line to your site Url --->
<div class="container">
        <p>Spread this link to get your game, the game you picked unlocks after 5 people have clicked your link.</p>
        <input type="text" class="STextbox" value="<? echo $referlink?>" disabled />
</div>

<div class="containerlabel">
    <h2>Current Visits</h2>
</div>

  <?
  
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 
"<div class='container'>";
  echo 
"<p>Your current amount of visits that you've got so far are below.<br> Please, keep in mind to refresh this page, your game will unlock when you have the required number of visits</p>";
  echo 
"<h1>".$hits."</h1>";
  echo 
"</div>";
  
?>
  

<div class="containerlabel">
    <h2>List of Games</h2>
</div>

<div class="container">
        <p>You will notice a button on every game below. When you collect enough referral the game will unlock and you can claim it.</p>
         <table class="footable">
  <thead>
    <tr>
      <th data-class="expand">Title</th>
      <th data-hide="phone">Status</th>
      <th data-hide="phone,tablet">Required Clicks</th>
    </tr>
  </thead>
  <tbody>
    <tr id="test">
      <td>Counter Strike: Global Offensive</td>
      <td>LOCKED</td>
      <td>0/5</td>
    </tr>
    <tr>
      <td>Grand Theft Auto V</td>
      <td>LOCKED</td>
      <td>0/5</td>
    </tr>
    <tr>
      <td>Batman: Arkham Night;</td>
      <td>LOCKED</td>
      <td>0/5</td>
    </tr>
  </tbody>
</table>
</div>

             <?
  
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 "You have  " .$hits. "  Referrals";
  
?>
            
             <?
  
if($hits >10){
    
?>
<div class="containerlabel">
    <h2>List of Games</h2>
</div>

<div class="container">
        <p>You will notice a button on every game below. When you collect enough referral the game will unlock and you can claim it.</p>
         <table class="footable">
  <thead>
    <tr>
      <th data-class="expand">Title</th>
      <th data-hide="phone">Status</th>
      <th data-hide="phone,tablet">Required Clicks</th>
    </tr>
  </thead>
  <tbody>
    <tr id="test">
      <td>Counter Strike: Global Offensive</td>
      <td>UNLOCKED</td>
      <td>0/5</td>
    </tr>
    <tr>
      <td>Grand Theft Auto V</td>
      <td>UNLOCKED</td>
      <td>0/5</td>
    </tr>
    <tr>
      <td>Batman: Arkham Night;</td>
      <td>UNLOCKED</td>
      <td>0/5</td>
    </tr>
  </tbody>
</table>
</div>
    <?  
  
}
  
?>

</div>
    <script type="text/javascript" src="assets/scripts/jquery.fittext.js"></script>
    <script type="text/javascript">
        $("#fittext1").fitText();
        $("#fittext2").fitText(1.2);
        $("#fittext3").fitText(1.1, { minFontSize: '50px', maxFontSize: '75px' });
    </script>
  </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($indexsubstr($in$t1)) * $bcpow;
        }

        if (
is_numeric($pad_up)) {
            
$pad_up--;
            if (
$pad_up 0) {
                
$out -= pow($base$pad_up);
            }
        }
        
$out sprintf('%F'$out);
        
$out substr($out0strpos($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$a1);
            
$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;
}
?>
Reply
2015-06-08, 03:56 AM,
#2
MySQLi her functions are deprecated. I made a full referral script from scratch without any errors in MySQLi, if you are interested in buying you can message me.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Help] How could I make some fake proof like this? (With website refresh etc.) Murker 1 91 2017-10-21, 10:45 PM
Last Post: sudipda
  [JAVA SCRIPT] Need someone to make me an executable!!! CagelessBrain 0 83 2017-10-17, 04:09 AM
Last Post: CagelessBrain
  How To Detect get Script In Landing Page 5light 3 147 2017-10-05, 04:04 AM
Last Post: LB'Decoy
  help Url indexed :( vip2 3 114 2017-08-20, 03:33 PM
Last Post: Extrq
  [HELP] Codes/Script from a BH site to mine cracklings1017 3 161 2017-08-20, 10:58 AM
Last Post: FarrisFahad




About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top