Forum Moderators: DixonJones
Is there an easy way to grab the initial refer (in realtime, not logs) when a visitor comes in via ANY page on a site and hold it (on disk?) on the server so that I don't have to bother the user with a cookie?
This would be used for a mini-affiliate program so that if they buy something and "checkout" the initial refer can be given credit for the purchase. Obviously I would want to also store the incoming URL so that some kind of ID# can be passed and will be available as a fallback if the refer is blocked.
I can muck my way through perl if anyone has some code snippets they can point me to, thanks for any help! -aV-
From there it's simple enough to store it to disk.
However the issue is how you then re-associate that data back to a specific user at a later date without either a permenant cookie, session cookie or some other method of keeping state (ie remembering stuff about a user).
- Tony
hmm, can PHP track a session without appending the URL?
click on the 'view source' link to see the source code of the cgi program.
an example in php:
<?php
$var = $_SERVER["HTTP_REFERER"];print "your referrer is $var";
?>
in ssi/shtml:
<!--#if expr="${HTTP_REFERER}" -->
your came here from <!--#echo var="HTTP_REFERER" -->
<!--#endif -->
hope this helps. (:
amznVibe in php you can use a transparent session id as well.
On this page
[php.net...]
look for session.use_trans_sid
if you don't use a cookie/session and drop the info a db there needs to be a way to tie the data to the user.