开发者

Long integer to 16 character Hex for Google Reader sync

Python Code

开发者_如何学运维
h = "%s"%("0000000000000000%x"%(i&0xffffffffffffffff))[16:]

I'd like to know how this would be done in PHP.

The application is for google reader syncronization. An initial sync list comes with numeric values, but the actual article id hex.

Example Long Integer = 8643979098044673995

Example Google Reader Article ID = tag:google.com,2005:reader/item/77f5953120daafcb


sprintf("%016x", 8643979098044673995);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜