Hey coders, i need some help, i'm doing some EPP standard stuff
and i have this xml and EPP standard says you need to add 4 bytes to the top of the xml with the total xml size (xml + 4 bytes),
anyways i was doing that like this, since UTF-8 characters are 1byte long
anyways that would prepend the hex value of the total $output size but less then 4 bytes so i did this:
this way i would allways get 4bytes at the top of the message, but atm those 4 bytes are just numbers and not bytes so how do i "encode" them? i've tried utf8_encode with no sucess.
heres the document that guides de EPP standard i'm trying to follow (in case i didn't made my point )
any help apreciated.
and i have this xml and EPP standard says you need to add 4 bytes to the top of the xml with the total xml size (xml + 4 bytes),
anyways i was doing that like this, since UTF-8 characters are 1byte long
PHP:
$output;
$output = dechex(strlen($output)+4) . $output;
anyways that would prepend the hex value of the total $output size but less then 4 bytes so i did this:
PHP:
$size = dechex(strlen($output)+4);
while(strlen($size) <= 5){
$size = '0' . $size;
}
$output = $size . $output;
this way i would allways get 4bytes at the top of the message, but atm those 4 bytes are just numbers and not bytes so how do i "encode" them? i've tried utf8_encode with no sucess.
heres the document that guides de EPP standard i'm trying to follow (in case i didn't made my point )
any help apreciated.