Jump to content

Just a little help...


AdamDowning

Recommended Posts

Hey Guys

 

Just seeking a little help with this script. I have created it, and now I want to make it so that when the person has 5 referrals, it changes over a part of the script to link to another website

 

<?php
  $code = $_SERVER['REMOTE_ADDR'];
  $code = md5($code);

   if(file_exists('referrals/' . $code . '.txt'))
    {
     $referrals = file_get_contents('referrals/' . $code . '.txt');
    }
   else
    {
     $referrals = 0;
    }

  $ips = file_get_contents('ips.txt');
  $ips = explode(',',$ips);

if(!in_array($_SERVER['REMOTE_ADDR'],$ips))
  {
   if(isset($_GET['refcode']))
    {
     $file = fopen('referrals/' . $code . '.txt','w');
     fwrite($file,'0');
     fclose($file);
     @$refs = file_get_contents('referrals/' . $_GET['refcode'] . '.txt');
     $refs++;
     $file = fopen('referrals/' . $_GET['refcode'] . '.txt','w');
     fwrite($file,$refs);
     fclose($file);
     $file = fopen('ips.txt','a');
     fwrite($file,$_SERVER['REMOTE_ADDR'] . ',');
     fclose($file);
    }
   else
    {
     $file = fopen('ips.txt','a');
     fwrite($file,$_SERVER['REMOTE_ADDR'] . ',');
     fclose($file);
    }
  }
else
  {
  }
?>

 

[/code]

<div class="pack">

<a href="javascript:alert('You need <? $var = 5-$referrals; echo $var; ?> more referrals to unlock 1600 Microsoft Points.');" alt="1,600 Points">5 Referals!<br/>

<img src="pack1.gif" border="0" alt="1,600 Points" />

</a>

<br/>

<span>US, UK & EU</span>

</div>

<div class="spacer"></div>

<div class="pack">

<a href="javascript:alert('You need <? $var2 = 10-$referrals; echo $var2; ?> more referrals to unlock 2100 Microsoft Points.');" alt="2,100 Points">10 Referals!<br/>

<img src="pack2.gif" border="0" alt="2,100 Points" />

</a>

<br/>

<span>UK & EU</span>

</div>

<div class="spacer"></div>

<div class="pack">

<a href="javascript:alert('You need <? $var3 = 15-$referrals; echo $var3; ?> more referrals to unlock 4200 Microsoft Points.');" alt="4,200 Points">15 Referals!<br/>

<img src="pack3.gif" border="0" alt="4,200 Points" />

</a>

<br/>

<span>US, UK & EU</span>

</div>

</div>

[/code]

 

Now code ONE is my PHP script, this makes the referral count work. I have also made the HTML/JS code work so that it counts down how many referrals a person needs to obtain before unlocking the content. But, I want to make the HTML code so that when they have say, 5 referrals, and they click the image, it changes from

 

<a href="javascript:alert('You need <? $var = 5-$referrals; echo $var; ?> more referrals to unlock 1600 Microsoft Points.');" alt="1,600 Points">5 Referals!<br/>

 

to the code bwloe

 

<a href="http://www.website.com" alt="1,600 Points>5 Referrals!<br/>

 

Can anybody assist me with how I would do this please?

Thanks

Link to comment
https://forums.phpfreaks.com/topic/204109-just-a-little-help/
Share on other sites

If someone is able to re-produce the cookie, they can perform an identity theft.

 

To be honest bro I don't think that he even cares. It looks like this is one of those scam sites with an intelligent twist. To earn the microsoft points you have to refer others to the site so instead of stealing 1 person's account you have stolen their account and all of their friends. I refuse to help people like this :P

Link to comment
https://forums.phpfreaks.com/topic/204109-just-a-little-help/#findComment-1069118
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.