Manual:FetchText.php/en

Details
fetchText.php file is a maintenance script to fetch a particular revision text from an old_id.

Usage
Provide a text id (old_id from the text table) followed by a newline, and the script will output a string containing the following in order: The text string itself is *not* followed by newline. You can exit from the script typing.
 * textid
 * length of text (-1 on error = failure to retrieve/unserialize/gunzip/etc)
 * text (may be empty)