note 102005 rejected from function.md5 by danbrown
| From: | danbrown@php.net | Date: | Sat, 22 Jan 2011 15:18:57 +0000 |
| Subject: | note 102005 rejected from function.md5 by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-176007@lists.php.net to get a copy of this message | ||
Note Submitter: n dot talebi at gmail dot com
----
Anyone can help me to understand what these lines do:
$NewU = strtolower( substr( md5( time( ) ), 0, 5 ) );
$NewP = strtolower( substr( md5( time( ) ), 5, 5 ) );
$AHcode = substr( base64_encode( md5( $NewU ) ), 5, 15 ).substr( base64_encode( md5( $NewP ) ), 10,
15 );
$afile = file_get_contents( dataPath."inc/config.php" );
$afile = str_replace( array( "\r\n", "\r", "\n" ),
"{XXXBRXXX}", $afile );
$afile = preg_replace( "/\\/\\*ahash start\\*\\/(.*?)\\/\\*ahash end\\*\\//e",
"", $afile );
$afile = str_replace( "{XXXBRXXX}", "\n", $afile );
$afile = str_replace( "define(\"_START_ID\"", "/*ahash
start*/\ndefine(\"ahash\",\"".$AHcode."\");\n/*ahash
end*/\n\ndefine(\"_START_ID\"", $afile );
thanks...