Jump to content
php.lv forumi

IFrame and Browser Location


Kracker

Recommended Posts

Uzģenerē sesijā mainīgo.

 

index.php:

$_SESSION['token'] = uniqid(); // Iegūstam random identifikatoru


$iframfe_url = 'lapa.lv?kontakti&token=' . $_SESSION['token'];

 

 

tad iekš kontakti.php

if(!isset($_SESSION['token'] || $_GET['token'] !== $_SESSION['token']){

exit('Pa tieso nevar atvērt!');

}
// Nodzēsam sito tokenu. Lai atkal atvērtu kontaktu lapu, būs jāaieet index lapā.
unset($_SESSION['token']);

Edited by briedis
Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...