SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    May 2008
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    feed subscribers bypassing login page

    I need some tips and ideas about my project.Am allowing users to subsribe via feed to a secured page on my website.
    http://www.weblunar.com/forex2/alerts.php

    now how can i allow subscribers via feed to bypass the login page for this secured page
    here is my security checking code for the secured page;

    PHP Code:
    if(! isset($_SESSION['username'])) {

        
    header("Location: login.php");

    users coming via feed won't have a session
    can someone give me some coding ideas

    cheers

  2. #2
    Web Professional
    Join Date
    Oct 2008
    Location
    London
    Posts
    862
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    if(!isset($_SESSION['username']) && $_SERVER['REQUEST_URI'] != '/forex2/alerts.php') {
        
    header("Location: login.php");

    Unless I understood you wrong and you still want the page to be password protected when visited by a browser. In that case you can either use agent sniffing (not recommended) or use separate pages for browser access and RSS readers (this is how it should be done).


Bookmarks

Posting Permissions

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