How to check if a webpage is visited through another webpage

  • Scott123
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Nov 25, 2008
  • Posts: 10
  • Status: Offline

Post November 30th, 2008, 12:56 am

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
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post November 30th, 2008, 12:56 am

  • techwiz
  • Beginner
  • Beginner
  • User avatar
  • Joined: Dec 31, 2007
  • Posts: 46
  • Status: Offline

Post November 30th, 2008, 6:03 am

Set up google analytics in your pages and set goals to match what you have described.
  • Pro PHP
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Nov 30, 2008
  • Posts: 8
  • Status: Offline

Post November 30th, 2008, 8:34 am

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
  • No Avatar
  • Joined: Nov 25, 2008
  • Posts: 10
  • Status: Offline

Post November 30th, 2008, 11:03 am

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
  • No Avatar
  • Joined: Nov 30, 2008
  • Posts: 8
  • Status: Offline

Post November 30th, 2008, 11:40 am

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
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13458
  • Loc: Florida
  • Status: Offline

Post November 30th, 2008, 11:55 am

Look into memcached. You can use memcached as a session storage facility across multiple domains.
Strong with this one, the sudo is.

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 136 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
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.