Sorting products as per your own random number in Magento
In admin panel
Go to Manage Categories, select the category, then on it's products tab give each one a position number. They will be sorted according to that order.
That's it.... Enjoy Chandresh rana's Coding.... :)