If set to TRUE, uniqid() will add additional entropy (using the
combined linear congruential generator) at the end of the return
value, which should make the results more unique.
“uniqid,” PHP documentation
It’s a weird clause. Adding additional entropy already has a highly
specific, mathematical meaning, none of which is conveyed by something
more unique. In fact, that would probably confuse the people who are
not vaguely aware of entropy and cryptography. If it’s set to false,
is it less unique? Will it somehow duplicate itself? Existential
crisis, existential crisis, et cetera. All well. Without PHP, the
English language would just sit there, unmolested by grammatical atrocities
like these.
del.icio.us has a little-exploited JSON API. Besides the lack of documentation, it also has one other catch: It automatically backslash-escapes single quotes and turns the quotation mark into ", possibly among other characters. I can only assume the API assumes you will immediately eval the output and then spit it out onto a web page. Hilariously, del.icio.us converts to character entities again, leading you to actually see " strewn around on that demo as pictured above from my links. Anyway, the point is PHP’s json_decode, being the black box Exception-less and soulless monster it is, will silently fail on trying to parse the mess. The solution? Below.
$s = file_get_contents("http://del.icio.us/feeds/json/hao2lian?raw");
$posts = json_decode(stripslashes($s), true);
Getting rid of the automatic character entitification is left as an exercise to the people of Tunisia, who have had it too good for far too long.