Restrict Access to a page in a Wordpress website only for specific referrer
<p>I would like to restrect access to one page in a wordpress website, so that the page is only accessible to users coming from a specific website.
Lets say my wordpress website is www.wptest.com and the page www.wptest/tickets should be accessible only to the users coming from the website www.eventorganisatortest.com/register 
How is that possible with Javascript? I have a solution with php, but I would like a javascript one. I know, it could be easily spoofed, but it doesn't matter, as our users are not that experienced, and even if they do it, it's not a big deal.. We just make our effort so that they register first on the www.eventorganistortest.com website and click on the button "Buy Tickets" on it, to get redirected to our portal www.wptest/tickets and buy their tickets.</p>

<p>Here is the php code that could do that actually.. </p>

<p><a href="https://stackoverflow.com/questions/14854117/php-allow-access-to-specific-referrer-url-page-only">PHP Allow access to specific referrer url/page only</a></p>