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);
精彩评论