BillyT Posted November 20, 2008 Share Posted November 20, 2008 Hi there let's say I have a page called www.mydomain.com/mypage.php In mypage.php, how can I check if the page is being loaded via the url forwarding that most domain registrars provide? ie if someone has registered www.theirdomain.com and pointed it at my page above, how can I tell? All the php and javascript code I have tried just return mydomain.com I hope that makes sense Thanks in advance Quote Link to comment Share on other sites More sharing options...
revraz Posted November 20, 2008 Share Posted November 20, 2008 I would think the referer would be set. $ref=@$HTTP_REFERER; echo "Referrer of this page = $ref "; Maybe it's blank if they typed it directly, give it a try. Quote Link to comment Share on other sites More sharing options...
BillyT Posted November 20, 2008 Author Share Posted November 20, 2008 thanks for the reply. I'm not sure if this would be adequate though, as there will be many times that users will follow a link to mydomain.com/mypage.php so the referrer would be set to another domain there as well. Is that correct? thanks again Quote Link to comment Share on other sites More sharing options...
revraz Posted November 21, 2008 Share Posted November 21, 2008 Yep, but that is what you asked for. Quote Link to comment Share on other sites More sharing options...
BillyT Posted November 21, 2008 Author Share Posted November 21, 2008 no I need to know if the page was loaded via URL forwarding as opposed to someone clicking a regular link Quote Link to comment Share on other sites More sharing options...
BillyT Posted November 26, 2008 Author Share Posted November 26, 2008 still looking for a way to know if a page has been loaded via URL forwarding - any ideas? Thanks in advance Quote Link to comment Share on other sites More sharing options...
haku Posted November 26, 2008 Share Posted November 26, 2008 There is no way to differentiate how the user came from another URL. It will appear the same to your browser whether they were forwarded, or clicked through. Actually, you could manually check each of the URLs that are coming into your site and see what happens. Quote Link to comment Share on other sites More sharing options...
ShiloVir Posted November 26, 2008 Share Posted November 26, 2008 on one page make a MD5 checksum, and when u load a form u gotta check that MD5 and make sure it is equal to the previous one set. u gotta make the MD5 change each time the page is changed. when the browser is closed the MD5 expires. if u leave the page the MD5 changes. make sure the form is checking for the MD5 somewhere and you should be fine Quote Link to comment Share on other sites More sharing options...
BillyT Posted November 26, 2008 Author Share Posted November 26, 2008 thanks for the replies. Haku I have manually checked some links and found a couple of people using URL forwarding to make mydomain.com/mypage.php look like theirdomain.com My question is, can I put some javascript or php on mypage.php to see whether or not the domain in the url is equal to mydomain.com? As I mentioned in my first post, everything I have tried still returns mydomain.com even though in the browser it says theirdomain.com. Thanks again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.