Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Gábor Papp
Added: Oct 30, 2019 11:14 AM
Views: 4
Tags: no tags
  1. if ($_GET['tesztmost']=='igen') {
  2.     setcookie('tesztmost','igen', time()+60*60*24 ,"/"); // 60*60*24=86400 = 1 nap
  3.     header("Location: /"); exit;
  4. }
  5. if ($_COOKIE['tesztmost']!='igen') { echo 'Fejlesztés alatt!'; exit; }