Referral link

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kampuz
Forum Newbie
Posts: 7
Joined: Thu Aug 04, 2005 5:19 am

Referral link

Post by kampuz »

I would like to have in my site a simple system of referral links. I only want to be able to know who recommended a user to my site.
I made a search in the forum but I only found complex systems.

Can anyone tell me a easy way to make this?

Thanks
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

an input box with a label "referrer - who referred you to this site?"
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

If you're using this information to check which sites are "recommending" you then do as Jenk says.... it's foolproof (almost ;)).

If you simply want to know where people are coming from then either read your apache logs or check if $_SERVER['HTTP_REFERRER'] exists and store that info.
kampuz
Forum Newbie
Posts: 7
Joined: Thu Aug 04, 2005 5:19 am

Post by kampuz »

Hi,

I want to be able to create referral links to pay comissions based on sales.
Example:
The client 1 gets a unique ref link
The client 2 hits the link from client1 and a cookie stores this information on his computer
When client 2 makes a spend, the info from the cookie is inserted on a special field.

Thanks
Post Reply