Gopher エリソ�
PHP Manual

gopher_parsedir

(PECL net_gopher >= 0.1)

gopher_parsedirgopher ・ユ・ゥ。シ・゙・テ・ネ、ホ・ヌ・」・�ッ・ネ・�ィ・ネ・熙「チロヌロホヒハムエケ、ケ、�

タ篶タ

array gopher_parsedir ( string $dirent )

gopher_parsedir() 、マ。「gopher ・ユ・ゥ。シ・゙・テ・ネ、オ、�ソ・ヌ・」・�ッ・ネ・�ィ・ネ・熙「チロヌロホヒハムエケ、キ、゙、ケ。」

gopher 、マ。「・�ッ・ィ・ケ・ネ、ヒツミ、キ、ニ text/plain キチシー、ホ ・ノ・ュ・螂皈ネ、ヨ、キ、゙、ケ。」・ヌ・」・�ッ・ネ・遙ハホ网ィ、ミ / 、ハ、ノ。ヒ、リ、ホ・�ッ・ィ・ケ・ネ、ヒ、マ ニテハフ、ヒ・ィ・ウ。シ・ノ、オ、�ソー�「、ホケヤ、ヨ、キ。「、ス、ホクト。ケ、ホケヤ、ャ 1 、ト、ホ・ヌ・」・�ッ・ネ・� ・ィ・ネ・熙「、�、、マセヤ、ス、キ、゙、ケ。」

・ム・鬣癸シ・ソ

dirent

・ヌ・」・�ッ・ネ・�ィ・ネ・遙」

ハヨ、�ヘ

ーハイシ、ホヘラチヌ、ォ、鬢ハ、�「チロヌロホヨ、キ、゙、ケ。」

シコヌヤ、キ、ソセ�遉ヒ、マ。「、オ、鬢ヒ data 、ネ、、、ヲ・ィ・ネ・熙ャ、ウ、ホヌロホヒトノイテ、オ、�「、ス、ウ、ヒ・ム。シ・ケ、キ、ソケヤ、ャエ゙、゙、�゙、ケ。」

ホ�

ホ�1 gopher://gopher.example.com/ 、ォ、鬢ホスミホマ、ハイシ、ホ、隍ヲ、ヒイセト熙ケ、�

0All about my gopher site.               /allabout.txt               gopher.example.com    70
9A picture of my cat.                    /pics/cat.png               gopher.example.com    70
1A collection of my writings.            /stories                    gopher.example.com    70
hThe HTTP version of this site.          URL:http://www.example.com  gopher.example.com    70
1Mirror of this site in Spain.           /                           gopher.ejemplo.co.es  70
iWelcome to my gopher site.                                          error.host            1
iPlease select one of the options above                              error.host            1
iSend complaints to /dev/null                                        error.host            1
iLong live gopher!                                                   error.host            1

セ螟ホホ网ヌ。「gopher.example.com 、ホ・�シ・ネ・ヌ・」・�ッ・ネ・熙ヒ、マ ID 0 、ホ・ノ・ュ・螂皈ネ 、ャ gopher://gopher.example.com:70/allabout.txt 、ヒ、「、熙゙、ケ。」 、゙、ソ。「2 、ト、ホ・ヌ・」・�ッ・ネ・遙ハ、ス、�セ、�ネシォ、ホ・ユ・。・、・��ンサ�、キ、゙、ケ。ヒ、ャ gopher://gopher.exmaple.com:70/stories 、ェ、隍モ gopher://gopher.ejemplo.co.es:70/ 、ヒ、「、熙゙、ケ。」 、ス、ホツセ、ヒ・ミ・、・ハ・�ユ・。・、・�ヲHTTP URL 、リ、ホ・�ッ。ヲ、ス、キ、ニセホケヤ、ャ、「、熙゙、ケ。」

・ヌ・」・�ッ・ネ・��ホウニケヤ、� gopher_parsedir() 、ヒナマ、ケ、ネ。「 、ス、ホ・ヌ。シ・ソ、「チロヌロホチシー、ヒ・ユ・ゥ。シ・゙・テ・ネ、キ、゙、ケ。」

ホ�2 gopher_parsedir() 、ホサネヘムホ�

<?php
$directory 
file("gopher://gopher.example.com");

foreach(
$directory as $dirent) {
    
print_r(gopher_parsedir($dirent));
}
?>

セ螟ホホ网ホスミホマ、マーハイシ、ネ、ハ、熙゙、ケ。」

Array (
  [type] => 0
  [title] => All about my gopher site.
  [path] => /allabout.txt
  [host] => gopher.example.com
  [port] => 70
)
Array (
  [type] => 9
  [title] => A picture of my cat.
  [path] => /pics/cat.png
  [host] => gopher.example.com
  [port] => 70
)
Array (
  [type] => 1
  [title] => A collection of my writings.
  [path] => /stories
  [host] => gopher.example.com
  [port] => 70
)
Array (
  [type] => 254
  [title] => The HTTP version of this site.
  [path] => URL:http://www.example.com
  [host] => gopher.example.com
  [port] => 70
)
Array (
  [type] => 1
  [title] => Mirror of this site in Spain.
  [path] => /
  [host] => gopher.ejemplo.co.es
  [port] => 70
)
Array (
  [type] => 255
  [title] => Welcome to my gopher site.
  [path] =>
  [host] => error.host
  [port] => 1
)
Array (
  [type] => 255
  [title] => Please select one of the options above.
  [path] =>
  [host] => error.host
  [port] => 1
)
Array (
  [type] => 255
  [title] => Send complaints to /dev/null
  [path] =>
  [host] => error.host
  [port] => 1
)
Array (
  [type] => 255
  [title] => Long live gopher!
  [path] =>
  [host] => error.host
  [port] => 1
)


Gopher エリソ�
PHP Manual