Hello everyone, I was just wondering if there is a way to pass the main server url from one site to another because I would like to build a simple referral system that when someone clicks on a referral link in www.site1.com/sample.html , they are redirected to www.site2.com/referral.php, which catches the first url and says something like "thank you for visiting our sister site www.site1.com, please proceed".
I know that I can use $_SERVER to hold the variable locally but how do i pass that through a url and strip away everyting but the server url....thanks a lot in advance.
the sender can include it's name in the link
<a href="http://whereever.com?ref=<?php print $_SERVER['SERVER_NAME']; ?>">click</a>
and the receiver can use the ref passed in the url, or use the referrer variable
print $_SERVER['HTTP_REFERER']
Works great...but what about if the referring site does not have php capabilities, can I then just pass the info via a form and post data and then capture it on my end in the php page?