PHPBuilder - Display Manual Pages On Web Server



RSS Twitter
Snippets Other

Display Manual Pages On Web Server

by: Grant Walters
|
August 25, 2000

Version: 1.0

Type: Full Script

Category: Other

License: GNU General Public License

Description: Uses man | col -b so if you have groff you'll be fine



<!-- Only Requirement Is col -b -->
<H1>Manual Pages</H1>
<p>Enter the manual page command you want and it will be returned to you if it exists.</p>
<form method="post" action="man.php3">
<p><input type="text" name="page" value="<? echo $page ?>" size="25"></p>
<p><input type="submit" value="Submit"></p>
</form>
<?
if (isset($page)) {
  $fp = popen("man $page | col -b","r");
  echo "<PRE>";
  while (!feof($fp)) {
    $buffer = fgets($fp, 132);
    echo "$buffer";
  }
  pclose($fp);
  echo "</PRE>";
}
?>

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Grant Walters

Comment:



Comment:

(Maximum characters: 1200). You have characters left.