Oh really? I know ASP, PHP, ColdFusion and a few others. You really shouldn't make such global statements... just because you don't know ASP doesn't mean it's not a viable tool, nor is it a good idea as a web developer to lock yourself into one singular technology. Knowing more than one makes you a bit more marketable.
Here's your Encrypt function in ASP, the only difference being I passed the encryption key in while in the PHP counterpart it was a GLOBAL. You can make it a global type of variable in your ASP too. function Encrypt( strEncryptThis, strEncryptionKey) dim i dim strNewString dim strCurChar for i = 1 to Len( strEncryptThis ) strCurChar = Asc( Mid( strEncryptThis, i, 1 )) strCurChar = strCurChar + Asc( Mid( strEncryptionKey, i, 1)) strNewString = strNewString & strCurChar next Encrypt = strNewString end function At 09:24 AM 11/26/2001 -0500, Casey Allen Shobe wrote: >This is a PHP mailing list, I doubt you'll find anyone who knows, or wants to >know ASP. Why not use PHP for this, and dump ASP (along with the slow, >bug-ridden webserver it runs on [unless you're using Apache::ASP])? > >On 26 November 2001 9:00, Jean-Arthur Silve wrote: > > Hi ! > > > > I work with someone who use ASP :-(( ... > > Is someone could translate this function to ASP ?? > > I don't think it's hard, but when you don't know ASP... > > > > function encrypt($str) > > { > > global $STRCRYPT; > > > > $i = strlen($str); > > $newstr=""; > > for ($j=0;$j<$i;$j++) > > { > > $car = substr($str,$j,1); > > $car = ord($car); > > $car = $car + ord(substr($STRCRYPT,$j,1)); > > $car = sprintf("%03d",$car); > > $newstr.=$car; > > } > > return $newstr; > > } > > > > > > > > ---------------------------------------------------------------- > > EuroVox > > 4, place Félix Eboue > > 75583 Paris Cedex 12 > > Tel : 01 44 67 05 05 > > Fax : 01 44 67 05 19 > > Web : http://www.eurovox.fr > > ---------------------------------------------------------------- > >-- >Casey Allen Shobe >[EMAIL PROTECTED] >GCS/CM d+ s+:->+: a-- C++(++++) ULU++++$ P- L+++>++++ E- W++ N++ !o K- w-- !O >M V- PS++ PE Y+ PGP>++ t+ 5+ X R>+ tv-- b++ DI+ D---- G++ e h-(*) r--- z-- > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]