www.webdeveloper.com
Results 1 to 4 of 4

Thread: Question regarding security and accessibility

  1. #1
    Join Date
    Oct 2003
    Posts
    183

    Question regarding security and accessibility

    Hello

    I have to make so a visitor just can reach a page if s/he have clicked on a link from another page. I dont own that webpage (where they have clicked the link) so I cant do whatever I want my thought was.....

    Is it possible (and secure) to make a algorithm that makes a unique key and then use that key in an urlrequest. Then when the visitor enters my page I controll that key and if it is ok the visitor get given information on that page. What I understand the page that the visitor enters if the key is correct must be in a protected catalogue so it just cant be downloaded or?

    Do you thinks this would work? Or do you have any other suggestions to achive this?

    Best regards /D_S

  2. #2
    Join Date
    Jun 2003
    Location
    here
    Posts
    4,551
    that makes little sense to me, are you talking about the sort of thing the have on gamefaqs where when you "hotlink" to a page you are instead redirected?
    that's not hard:
    PHP Code:
    <?
    $domain 
    "www.mysite.com";
    if(! 
    preg_match("/^http:\/\/".str_replace(".""\\."$domain)."/i"$_SERVER['HTTP_REFERER'])){
      if(
    $_SERVER['HTTP_REFERER'] != ""){
        echo 
    "please avoid hotlinking to my pages.";
        exit;
      };
    };
    ?>
    Last edited by scragar; 04-28-2005 at 09:57 AM.

  3. #3
    Join Date
    Jul 2003
    Location
    Spokane Washington
    Posts
    53
    You could grab the HTTP referrer from your page whenever they enter the site. I donít know if the visitors will always be entering on one page or if they could come in anywhere and still be granted access to that page. Anyway, grab the referrer, if itís the site youíre talking about give them a session value of true, then on the protected page only show it to people with the value of true for said variable.

  4. #4
    Join Date
    Oct 2003
    Posts
    183
    Thanks for your help! I'll try your advice

    /D_S

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles