1

Possible Duplicate:
https://stackoverflow.com/questions/5850962/how-to-count-clicks-on-a-get-value-with-php

I would like to create a referral system in which every new visitor gets his own unique link like http://example.com/?ref=12345. Does anyone know how this can be done?

Community
  • 1
  • 1
user719813
  • 583
  • 3
  • 11
  • 18
  • This seems like just simple database work to me... is there something specific that you're having trouble with? – sarnold May 31 '11 at 00:06
  • 1
    This is not really a question. You won't be able to build your 'referral system' without at least a basic notion of php. If you DID have a basic notion, you would not ask this. Furthermore, even if you DO get a decent answer (which I doubt), you still won't be able to implement it with at least a minimum knowledge of php. ( Flagged as question without a purpose. ) – Stephane Gosselin May 31 '11 at 00:12

1 Answers1

0

How about this

$id = md5($_SERVER["REMOTE_ADDR"])

header('Location: http://www.example.com/?ref='.$id);

I would also save this in a cookie because the IP address might change!!!

RoboTamer
  • 3,474
  • 2
  • 39
  • 43