Code Sample Preventing Session Fixation PHP

Control Over User Login Procedure - Cookies Authentication
Control Over User Login Procedure - Cookies Authentication

आज इस आर्टिकल में हम आपको Code Sample Preventing Session Fixation PHP के बारे में बताएंगे। 

Problem:- Code Sample Preventing Session Fixation PHP

Solution:-

<?php 	

ini_set('session.use_only_cookies', true);
session_start();

if (!isset($_SESSION['gen']) || $_SESSION['gen']< (time()-30)) {
	# code...
	session_regenerate_id();
	$_SESSION['gen'] = time();

}


 ?>

Final Words

  • आज इस आर्टिकल में हमने आपको Code Sample Preventing Session Fixation PHP के बारे में बताया।
  • अगर आपको इससे जुडी कोई अन्य जानकारी चाहए है तो निचे कमेन्ट बॉक्स में कमेन्ट कर के पूछ सकते है।

इसे भी पढ़े – Code Sample Preventing Session Hijacking PHP

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *