To the Top

The Online Fortune-Teller in the Browser with API

print a random, hopefully interesting, adage in the Browser

Buy Me A Coffee

This page provides an online fortune-teller utility which generates the random hopefully interesting message. It also provides API which is NOT rate limited.

Show Random Fortune using Ajax

Here is an example that shows a random adage using the API below.

API (Application Programming Interface)

The API (/fortune) can be called via the following (5 API Servers). It is subject to fair use policy. 1 second per call rate limit restriction
  1. Load Balancer: https://api.justyy.workers.dev/api/
It will return JSON-encoded data (example):
"Q:\tWhat is orange and goes \"click, click?\"\nA:\tA ball point carrot.\n"
Note: The API is rate-limit by 1 second per call.

Principle

We use the linux command fortune.

To install fortune packages, you need to do this:

apt-get install fortunes fortunes-spam fortunes-ubuntu-server fortunes-min fortunes-eo-ascii

Linux Command - Fortune Teller Usage

NAME
       fortune - print a random, hopefully interesting, adage

SYNOPSIS
       fortune [-acefilosuw] [-n length] [ -m pattern] [[n%] file/dir/all]

DESCRIPTION
       When fortune is run with no arguments it prints out a random epigram. Epigrams
       are divided into several categories, where each category is  sub-divided  into
       those which are potentially offensive and those which are not.

   Options
       The options are as follows:

       -a     Choose  from  all lists of maxims, both offensive and not.  (See the -o
              option for more information on offensive fortunes.)

       -c     Show the cookie file from which the fortune came.

       -e     Consider all fortune files to be of equal size (see discussion below on
              multiple files).

Share: List of Many Other Online Tools