PHP Login Security


SUBMITTED BY: crazyren

DATE: May 24, 2016, 12:10 a.m.

FORMAT: PHP

SIZE: 645 Bytes

HITS: 85076

  1. <?php
  2. /*
  3. * Hello
  4. * This is a function coded by me to help you protect your login panel from bypass vulnerability
  5. * Contact Me :-
  6. * Facebook : https://www.facebook.com/Daviddoaaofficial/
  7. * Twitter : https://twitter.com/daviddoaa
  8. */
  9. function SecureLogin( $string ){
  10. $string = str_replace ('&','&amp;', $string );
  11. $string = str_replace ('\'','&#039;', $string );
  12. $string = str_replace ('\"','&quot;', $string );
  13. if (phpversion() >= '4.3.0'){
  14. $string = mysql_real_escape_string($string);
  15. }else{
  16. $string = mysql_escape_string($string);
  17. }
  18. $string = str_replace ('\r\n',"\r\n", $string );
  19. return $string;
  20. }
  21. ?>

comments powered by Disqus