you could also scrape a lot of urls, using scrapebox or something similar, then put them into a mysql db, then have php grab a random row from the db.
More efficient and you could have literally millions in there.
Then you could append to that list of urls whenever you wanted, scrape new ones...