LearningLearning
asked on
Remember visitor arrival referral url then used inside website?
Hi
I am with Joomla CMS.
Some of the menu I have in my sites are
a, Main, Blog, FAQ, Join For Free
I wish to create a simple affiliate program which let my affiliate to promote through link at this format
http://www.domain.com/ref/ABC123 <- Affiliate Code (and this is the format I need)
All of the people who came through this link, will arrive at www.domain.com.
They might browse around the site e.g FAQ, Blog etc
Once they decided to join, they will click on "Join For Free".
The Join for free link will be
http://www.domain.com/join/XXXXXXX (which is ABC123) if the person arrived the site by typing http://www.domain.com, this will be filled with default value.
So how can I achieve this?
Remember the person affiliate code using cookies?
One a person click on Join then check the cookies and fill in the value?
I am open to any suggestion.
Apologize if I didnt my question clear. I am happy to clarify my enquiry
Thanks
I am with Joomla CMS.
Some of the menu I have in my sites are
a, Main, Blog, FAQ, Join For Free
I wish to create a simple affiliate program which let my affiliate to promote through link at this format
http://www.domain.com/ref/ABC123 <- Affiliate Code (and this is the format I need)
All of the people who came through this link, will arrive at www.domain.com.
They might browse around the site e.g FAQ, Blog etc
Once they decided to join, they will click on "Join For Free".
The Join for free link will be
http://www.domain.com/join/XXXXXXX (which is ABC123) if the person arrived the site by typing http://www.domain.com, this will be filled with default value.
So how can I achieve this?
Remember the person affiliate code using cookies?
One a person click on Join then check the cookies and fill in the value?
I am open to any suggestion.
Apologize if I didnt my question clear. I am happy to clarify my enquiry
Thanks
First thing you should do is trap the url http://www.domain.com/ref/ABC123
otherwise Page not found error will be showed. For traping the url use Url Rewriting
http://www.sitepoint.com/article/guide-url-rewriting
http://corz.org/serv/tricks/htaccess2.php
so you can get your referrer ABC123, store it in a session or hidden field or cookie, or where you like and access this whenever needed.
hope these helps
kiranvj
otherwise Page not found error will be showed. For traping the url use Url Rewriting
http://www.sitepoint.com/article/guide-url-rewriting
http://corz.org/serv/tricks/htaccess2.php
so you can get your referrer ABC123, store it in a session or hidden field or cookie, or where you like and access this whenever needed.
hope these helps
kiranvj
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
use php's explode function to extract the affiliate code
http://au3.php.net/explode
store it as cookie. then pass to join url