Reply to Re: htons & ntohs PHP Equivalent Functions

Your name:

Reply:


Posted by Justin Koivisto on 10/10/05 20:40

Womble wrote:

> Hi,
>
> I need to work out the length of a message in network byte order.
>
> Does PHP have an equivalent function of htons and ntohs?
>
> I've searched all the PHP documentation but have so far drawn a blank.
>

I've never used function like that before, but I believe that you may be
able to do it with the pack() function using the correct format. IIRC,
network byte order is big endian, so you;d want to look at n for 16 bit
unsigned short and N for 32-bit unsigned long.

HTH

--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация