How to check if a webpage is visited through another webpage

  • Scott123
  • Newbie
  • Newbie
  • Scott123
  • Posts: 10

Post 3+ Months Ago

Hi everyone,
I have a need to check if a webpage is visited through another designated webpage.
Here is the senario:
The main site is site-a.com/index.html
and there is a secret page site-a.com/secret.html
There is no link from site-a.com/index.html to secret.html
Then, there is another website site-b/index.html and there is a link on this page to site-a.com/secret.html
I want to make sure that users can only access secret.html via site-b.com, not via typing/refreshing/bookmarking the URL site-a.com/secret.html.
I guess, in this secret page, I need a way to check if this secret page is called from site-b.com. Anyone has ideas how to accomplish this?

Thanks.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • techwiz
  • Beginner
  • Beginner
  • User avatar
  • Posts: 46

Post 3+ Months Ago

Set up google analytics in your pages and set goals to match what you have described.
  • Pro PHP
  • Newbie
  • Newbie
  • Pro PHP
  • Posts: 8

Post 3+ Months Ago

Scott, something else you can use is called Statcounter (http://www.statcounter.com). Statcounter has a simpler interface, and I used it on my sites where I need to collect basic information like visitors and page impressions. It does track referrals, too.
  • Scott123
  • Newbie
  • Newbie
  • Scott123
  • Posts: 10

Post 3+ Months Ago

OK.
But if the visitor does not get to my site-a.com/secret.html via the designated site (in my example, site-b.com), I want to reject it by re-direct it to an error page.
Can Google analytics or Statcounter accomplish this?
Thanks.
  • Pro PHP
  • Newbie
  • Newbie
  • Pro PHP
  • Posts: 8

Post 3+ Months Ago

No, the Analytics program only measures - it cannot take any actions. What you are trying to accomplish can probably be done through a .htaccess file. I am not 100% certain on this, but I would definitely recommend looking into it.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

Look into memcached. You can use memcached as a session storage facility across multiple domains.

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 61 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.