Announcement

Collapse
No announcement yet.

Forum Authenticated Redirect to non-forum URL?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Forum Authenticated Redirect to non-forum URL?

    Thanks in advance for reading this...

    Can anyone offer guidance on how I can take .php source from my forum to create a page which validates that the viewer has logged into the forum before presenting them with content?

    I'm trying to provide my members a way to view a web camera, but I want them to login/register to the forums before popping up a "Address/Toolbar"-less browser with the web camera. The Address-less part is to prevent the average member from knowing the IP address of the webcam and bookmarking it to bypass the forum authentication in the future.

    What I have currently is giving me the following error and is not predictably prompting to authenticate.
    Unable to add cookies, header already sent.
    File: N/A
    Line: 0


    What I really want is a "forum looking page" which has a bit of text directions on it that I can insert script to launch a new window.

    Code:
    <html>
    <head>
    <title>Cameras</title>
    </head>
    <body background="../images/tabbkgnd.jpg">
    <SCRIPT type="Text/Javascript">
    myWindow=window.open("http:// IP Addr of WebCam","content","status=no,location=no,toolbar=no,directories=no,resizable=yes");
    </SCRIPT>
    <p>Enter this UserID and Password, then click the &quot;Login&quot; button.</p>
    
    <p><img border="0" src="../images/Login-HowTo.JPG"></p>
    <p>Return to <a href="../forums">forums</a>.</p>
    <body>
    <?php
    /*===============================================*\
    || ######################################### ||
    || # vBulletin 3.0.0 - Licence Number 
    || #-------------------------------------------------------------- # ||
    || # Copyright ©2000–2004 Jelsoft Enterprises Ltd. All Rights Reserved. ||
    || # This file may not be redistributed in whole or significant part. # ||
    || #----------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
    || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
    || ########################################## ||
    \*===============================================*/
    // ## SET PHP ENVIRONMENT ###########################
    
    error_reporting(E_ALL & ~E_NOTICE);
    ignore_user_abort(1);
    @set_time_limit(0);
    // ### DEFINE IMPORTANT CONSTANTS #######################
    
    define('NO_REGISTER_GLOBALS', 1);
    define('SESSION_BYPASS', 1);
    define('LOCATION_BYPASS', 1);
    define('THIS_SCRIPT', 'cron');
     
    // ###PRE-CACHE TEMPLATES AND DATA ######################
    // get special phrase groups
    $phrasegroups = array();
    
    // get special data templates from the datastore
    $specialtemplates = array();
     
    // pre-cache templates used by all actions
    $globaltemplates = array();
     
    // pre-cache templates used by specific actions
    $actiontemplates = array();
     
    // ####### REQUIRE BACK-END ############################
    require_once('./global.php');
    // ###################################
    
    // ####### START MAIN SCRIPT ############################
    // ############################################
    header(" ");
    /*==================================*\
    || ####################################
    || # Downloaded: 21:29, Wed Mar 24th 2004
    || # CVS: $RCSfile: cron.php,v $ - $Revision: 1.22 $
    || #####################################
    \*=============================================*/
    
    ?>
    </html>
    </body>
    

  • #2
    Because this involves external code I recommend you post this on www.vbulletin.org , the official vB hacking site. You will have better luck there.

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X