hi,
can anyone help pls..
i have php code which i need to be converted in vfp.
i need to get same result.
have anyone tried this.. pls help
i have sprintf and base64_encode routine.
for sprintf(), i can get same result using :
RIGHTC(Transform(LEN(CREATEBINARY(1)), '@02X'),2)
PHP
$tag = pack('H*', sprintf("%02X",1));
$value = "My Shop";
$length = pack('H*', sprintf("%02X",strlen($value)));
$lenVal = sprintf("%02X",strlen($value)) ;
echo base64_encode($tag.$length.$value) ;
Result :
AQdNeSBTaG9w
the problem is Pack(), how to translate in vfp
Thanks for help
Vie
can anyone help pls..
i have php code which i need to be converted in vfp.
i need to get same result.
have anyone tried this.. pls help
i have sprintf and base64_encode routine.
for sprintf(), i can get same result using :
RIGHTC(Transform(LEN(CREATEBINARY(1)), '@02X'),2)
PHP
$tag = pack('H*', sprintf("%02X",1));
$value = "My Shop";
$length = pack('H*', sprintf("%02X",strlen($value)));
$lenVal = sprintf("%02X",strlen($value)) ;
echo base64_encode($tag.$length.$value) ;
Result :
AQdNeSBTaG9w
the problem is Pack(), how to translate in vfp
Thanks for help
Vie