Jump to content

php security :)


jamesxg1

Recommended Posts

Hiya people,

 

i am making a project and basically i have made this thread for people to post any security patches, snippets, or any sort of php security that you know of what ever it may be :),

 

ill post some aswell

 

if (isset($_SESSION['HTTP_USER_AGENT'])) 
{
if ($_SESSION['HTTP_USER_AGENT'] != md5($_SERVER['HTTP_USER_AGENT'])) { 
/* Prompt for password */
exit;
}
} 
else { $_SESSION['HTTP_USER_AGENT'] = md5($_SERVER['HTTP_USER_AGENT']); 
}
$string = $_SERVER['HTTP_USER_AGENT']; 
$string .= 'SHIFLETT'; 
/* Add any other data that is consistent */
$fingerprint = md5($string); 

 

Fingerprint system :)

 

$VAR = filter_input(INPUT_POST OR GET, 'WHAT THE SCRIPT IS POSTING OR GETTING', FILTER_SANITIZE_STRING);

 

heres my example:

 

$username2 = filter_input(INPUT_GET, 'username', FILTER_SANITIZE_STRING);

 

:)

Link to comment
https://forums.phpfreaks.com/topic/144548-php-security/
Share on other sites

If you have the time, the PHP security video at:

 

http://videos.code2design.com/video/play/PHP/11

 

is great for beginners, and even for anyone that just needs to brush up on php security.

 

There are other php videos at http://code2design.com as well, and while they are more geared towards the beginner, I have nothing bad to say.

Link to comment
https://forums.phpfreaks.com/topic/144548-php-security/#findComment-758539
Share on other sites

If you have the time, the PHP security video at:

 

http://videos.code2design.com/video/play/PHP/11

 

is great for beginners, and even for anyone that just needs to brush up on php security.

 

There are other php videos at http://code2design.com as well, and while they are more geared towards the beginner, I have nothing bad to say.

 

thankyou for your post :),

 

i would watch them but i am running on a mobile broadband and the bandwith isnt high enough to buffer any videos :S

Link to comment
https://forums.phpfreaks.com/topic/144548-php-security/#findComment-758546
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.