Login   Register  
PHP Classes
elePHPant
Icontem

File: public_html/generateKeys.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Xavier Pérez  >  PHP Protected Page  >  public_html/generateKeys.php  >  Download  
File: public_html/generateKeys.php
Role: Auxiliary script
Content type: text/plain
Description: Example generating auth links
Class: PHP Protected Page
Block direct access to a page from external links
Author: By
Last change:
Date: 4 months ago
Size: 430 bytes
 

Contents

Class file image Download
<?php

// This code is for example only, never leave this script on your website witout htpasswd or another protection.
$SECRET_KEY 'mySecretKey12345679';
$SERVER $_SERVER['HTTP_HOST'];
$PAGE '/'// URL , best default to your project index.php
$USER 'myuserID@oranemail.com';
$TOKEN md5($SECRET_KEY '-' $USER '-' $SERVER);

// Example url
echo 'http://'.$SERVER.'/'.$PAGE.'?xid='.$USER.'&xtk='.$TOKEN;