~hippietrail/randompage.fcgi

❌

Random page per language redirects to a random entry in the English Wiktionary in the requested language. Language can be specified by name or by code.


 * Language codes are used with the  parameter and must be lowercase. WikiMedia and English Wiktionary extended language codes are accepted:
 * http://toolserver.org/~hippietrail/randompage.fcgi?langcode=zh-min-nan
 * Language names are used with the  parameter and must be the capitalized English name of the language:
 * http://toolserver.org/~hippietrail/randompage.fcgi?langname=Esperanto
 * As a bonus, namespaces and redirects are also supported by using "Redirect" or the namespace name prefixed with an underscore as the language name:
 * http://toolserver.org/~hippietrail/randompage.fcgi?langname=_Transwiki
 * To see a list of available languages pass the  parameter with any value:
 * http://toolserver.org/~hippietrail/randompage.fcgi?langs=1
 * To see the source code pass the  parameter with any value:
 * http://toolserver.org/~hippietrail/randompage.fcgi?dumpsource=1

Only the English Wiktionary is currently supported because the various Wiktionaries use different page formats. If people wish to contribute code to support other Wiktionary it will be accepted.

The data used is generated as the product of a series of command-line tools which index dump files in various ways. There is a text file named after each language as used in language headings in the English Wiktionary (including misspellings). The files are kept in a hard-coded directory for now. Files are read into memory as arrays and cached in memory until the server process terminates.