PHP Classes

File: secret.php

Recommend this page to a friend!
  Classes of Dave Smith   PHP Secret URL Path   secret.php   Download  
File: secret.php
Role: Example script
Content type: text/plain
Description: Authentication Example
Class: PHP Secret URL Path
Authorize access based on user click sequence
Author: By
Last change: fixed redirect
Date: 7 years ago
Size: 369 bytes
 

Contents

Class file image Download
<?php
session_start
();
include(
'secretpath.class.php');

if( empty(
$_SESSION['secpth']) ){
   
   
header('location: example.php');
    exit;
   
}else{
   
   
$secpth = unserialize($_SESSION['secpth']);
   
}

if(
$secpth->testAuth() === true ){
   
    echo
'Authorized Access!';
   
}else{
   
    echo
'Access Denied!';
   
}

?>