0

In the construction of our booking system client can view their bookings online. At the moment the URL of their page is created as a sequential number. So /booking1, /booking2, /booking3 etc...

I'd rather have unique name a bit like the JSFiddle way of doing it. A series of letters and numbers.

Is that possible?

skynet
  • 9,898
  • 5
  • 43
  • 52
Walrus
  • 19,801
  • 35
  • 121
  • 199
  • You've asked the exact same question already: http://stackoverflow.com/questions/5422065/php-random-url-names-short-url. – Alix Axel Mar 31 '11 at 15:21
  • Not exactly. And I also did not get a simple answer that I could work with. Thanks for the vote – Walrus Mar 31 '11 at 16:23
  • Why have you marked it as accepted then? – Alix Axel Mar 31 '11 at 16:25
  • Because at the time it answered the initial question but on further development their had to be an easier way of doing it. Thanks for the vote – Walrus Apr 01 '11 at 10:15

3 Answers3

3

Would uniqid be good enough for what you need?

http://php.net/manual/en/function.uniqid.php

Jean-Marc Pelletier
  • 1,272
  • 10
  • 7
0

uniqid function seems to be what you are looking for.

yent
  • 1,303
  • 1
  • 8
  • 10
0

you can use uniqid("bookingr", false);

CoolBeans
  • 20,654
  • 10
  • 86
  • 101