0

Basically I have 2 websites. website1 is the main website which is a blog. Now I am sending visitors to website2 if the visitor is not logged in to website1. Then website2 redirects visitors back to the website1 with some data so that he can log in.

Now my goal is to check if the user is coming from website2 or not.

I tried

$referer_parse = parse_url($_SERVER['HTTP_REFERER']); var_dump($referer_parse);

which returns array(1) { ["path"]=> string(0) "" }

I created an anchor tag for website1 and the visitors coming to website1 by clicking on the link shows the right things for the above code. But it is not working when website2 redirects automatically.

MD. Atiqur Rahman
  • 2,063
  • 4
  • 17
  • 30
  • I would use manually set UTM parameters like `http://www.website-a.com/?utm_source=website-b`. – Daniel W. Jan 18 '17 at 17:01
  • @DanFromGermany I already have a secured parameter like this. But I want to prevent users from tryping the url themselves by checking this so it becomes more secured. – MD. Atiqur Rahman Jan 18 '17 at 17:04
  • Keep one thing in mind. There is nothing like "a little bit secure". It's either 100% secure or not. – Daniel W. Jan 18 '17 at 17:14

0 Answers0