What is Gopher?

2026-03-29
Saigon, Vietnam
Mina
Gopher was introduced in 1991 as a way to organize and distribute information across the Internet before WWW became dominant. It was especially popular at universities in the U.S., where departments used it to publish course materials, research archives, and campus resources in a simple, menu-driven format. Long before browsers, Gopher offered a coherent way to "browse" information using nothing more than text.

What is Gopher?

2026-03-29
Saigon, Vietnam
Mina
Gopherは、WWWが主流になる以前に、インターネット上の情報を整理し配信する手段として、1991年に登場しました。 特にアメリカの大学で広く利用され、各学部や部署が、授業資料、研究アーカイブ、学内リソースなどを、 シンプルなメニュー形式で公開するために使われていました。 ブラウザが登場するはるか以前から、Gopherはテキストだけを用いて 情報を「閲覧」できる、一貫した仕組みを提供していたのです。

What is Gopher?

2026-03-29
Saigon, Vietnam
Mina
Gopher được giới thiệu vào năm 1991 như một cách để tổ chức và phân phối thông tin trên Internet, trước khi WWW trở nên phổ biến và thống trị. Nó đặc biệt được ưa chuộng tại các trường đại học ở Mỹ, nơi các khoa dùng nó để đăng tải tài liệu môn học, kho lưu trữ nghiên cứu và các tài nguyên trong khuôn viên trường dưới dạng menu đơn giản, dễ dùng. Từ rất lâu trước khi trình duyệt ra đời, Gopher đã cung cấp một cách “duyệt” thông tin mạch lạc, chỉ bằng văn bản thuần túy.
#!/usr/bin/perl
use strict;
use warnings;
use IO::Socket::INET;

my $host = "gopher.floodgap.com";
my $port = 70;
my $selector = ""; # empty means root menu

my $sock = IO::Socket::INET->new(
    PeerHost => $host,
    PeerPort => $port,
    Proto    => "tcp",
    Timeout  => 5,
) or die "Cannot connect\n";

# Send selector + CRLF
print $sock "$selector\r\n";

while (my $line = <$sock>) {
    chomp $line;
    last if $line eq "."; # end of menu

    my ($type, $rest) = ($line =~ /^(.)(.*)$/);
    my ($label, $sel, $h, $p) = split /\t/, $rest;

    printf "[%s] %s\n", type_name($type), $label;
}

close $sock;

sub type_name {
    return {
        '0' => 'TEXT',
        '1' => 'MENU',
        '7' => 'SEARCH',
        '9' => 'BINARY',
        'g' => 'GIF',
        'I' => 'IMAGE',
    }->{$_[0]} || "OTHER";
}
Above is a Gopher client written in Perl, designed to show how early Internet services were often explored directly, without layers of abstraction. It opens a raw TCP connection to a Gopher server, sends a simple selector request, and prints the returned menu in a human-readable form. No libraries beyond basic socket support — just text flowing over the network. Programs like this were common in the early days of the Internet.
上記はPerlで書かれたGopherクライアントで、初期のインターネットサービスが、抽象化の層を重ねることなく、直接的に探求されていたことを示すためのものです。 このプログラムはGopherサーバーに対して生のTCP接続を開き、シンプルなセレクタ要求を送信し、返ってきたメニューを人間が読める形で表示します。 基本的なソケット機能以外のライブラリは一切使わず、ネットワーク上を流れるのはただのテキストだけです。 このようなプログラムは、インターネットの黎明期にはごく一般的な存在でした。
Ở trên là một Gopher client được viết bằng Perl, nhằm minh họa cách mà các dịch vụ Internet thời kỳ đầu thường được khám phá trực tiếp, không qua nhiều lớp trừu tượng phức tạp. Nó mở một kết nối TCP thô đến máy chủ Gopher, gửi một yêu cầu selector đơn giản, rồi in ra menu trả về theo cách dễ đọc cho con người. Không dùng thư viện gì ngoài socket cơ bản — chỉ có văn bản chảy trực tiếp qua mạng. Những chương trình kiểu như thế này rất phổ biến trong những ngày đầu của Internet.