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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.