1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Make a page have a unique address for the ip they're visiting from?

Discussion in 'General Programming Chat' started by JasonZ10, Oct 9, 2011.

  1. JasonZ10

    JasonZ10 Regular Member

    Joined:
    Aug 28, 2010
    Messages:
    351
    Likes Received:
    242
    Location:
    Canada
    Hey guys,

    I'm starting a BH site that promises free stuff, in return for surveys and referrals, but of course, I will not deliver. I have a .com using WordPress if that's at all relevant, and for now, this is how the referral link is inputted:
    Code:
    <center><INPUT type="text" SIZE="41" MAXLENGTH="200" VALUE="http://website.com/ref5940.html"></center>
    
    I would like it to be a randomly generated 4 character number after "ref" to make it a bit more believable and also a XXXunique URL for the IP address (As of now it's website . com/referrallink.html but I'd like it to be some gibberish that's not accessible to anyone other than the first person that visited it and have it redirect to the homepage if the IP doesn't match.XXX (Came up with a better idea, see paint picture at the bottom of post)

    Hopefully this all made sense.. I know barely anything about coding so I'm going to need a lot of help, and if it works out, I'll find some way to pay you or help you out.

    EDIT: I made a little paint picture to make it overall easier to understand

    Code:
    http://i.imgur.com/DDSwS.png
     
    Last edited: Oct 9, 2011
  2. graceworld

    graceworld Newbie

    Joined:
    Oct 21, 2011
    Messages:
    30
    Likes Received:
    3
    Occupation:
    Programmer
    In PHP, $SERVER['REMOTE_ADDR'] gives you the IP.
    From there, you can hash it to a value using "md5"