converts a u_long from host to TCP/IP network byte order (which is big-endian).
E.g (vc++)
lNow=4221114;
ulNetVal = htonl (lNow);
ulNetVal give result 3127394304
In Vc++ htonl function can converts a u_long from host to TCP/IP network byte order (which is big-endian)
In PHP, Is there is any way we can do a convertioin like above vc++ example
My wrong understanding, If i use pack function. i expect the answer like above, But it result like this
<?php echo pack("N", "4221007"); ?> This is the result @hO
What should i do in order to get the result like above,
i.e converts a u_long from host to TCP/IP network byte order (which is big-endian).
converts a u_long from host to TCP/IP network byte order
Moderator: General Moderators