
HereisaveryrobustSimpleXMLparser.Canbeusedtoloadfiles,strings,orDOMintoSimpleXML,orcanbeusedtoperformthereversewhenhandedSimpleXML.<?php/***XMLParserClassFile**ThisclassloadsanXMLdocumentintoaSimpleXMLElementthatcan*beprocessedbythecallingapplication.Thisacceptsxmlstrings,*files,andDOMobjects.Itcanalsoperformthereverse,converting*anSimpleXMLElementbacki...

updown2steffenatmorklanddotcom6yearsagoInReplytodjjoklaandothersConsiderplacingallincudefilesasmentionedbeforeinaseperatefoldercontaininga.htaccesscontainingaOrderDeny,Allowthecreateaindexfile,whichisintendedtohandleALLrequestmadetoyouphpapplication,thencallitwithindex.php?view=indextheindexfilecouldlookabitlikethis:<?php]){case'index':include('libs/index.php');break;default:include('l...

updown2Anonymous1yearagoThesearetwosimplefunctionsIbuiltfor256-bitencryption/decryptionwithmcrypt.I'vedecidedtouseMCRYPT_RIJNDAEL_128becauseit'sAES-compliant,andMCRYPT_MODE_CBC.(ECBmodeisinadequateformanypurposesbecauseitdoesnotuseanIV.)Thisfunctionstoresahashofthedatatoverifythatthedatawasdecryptedsuccessfully,butthiscouldbeeasilyremovedifnecessary.<?php...