PHP: Net_Gopher - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

gopher_parsedir gnupg_verify

Last updated: Sat, 27 Jan 2007

view this page in

# LII. Net_Gopher

# Введение

The gopher protocol, as defined by RFC 1436, is generally considered the ancestor of the modern HTTP protocol. However, gopher was also intended to provide references to non-gopher resources including telnet, wais, nntp, and even http. This extension adds gopher support to PHP's URL Wrappers, and provides a helper function gopher_parsedir() to make sense of gopher formatted directory listings.

# Требования

# Установка

Net_Gopher is installed through the usual PECL package installation process.

- Prerequisite: `PHP 4.3.0`.

-     $ pear install Net_Gopher

- Copy the resulting `gopher.so` to an appropriate location and add `extension=gopher.so` to your `php.ini` file or load it dynamically in your PHP script using `dl("gopher.so");`

# Настройка во время выполнения

Данное расширение не определяет никакие директивы конфигурации в `php.ini`.

# Типы ресурсов

Данное расширение не определяет никакие типы ресурсов.

# Предопределенные константы

Перечисленные ниже константы определены данным расширением и могут быть доступны только в том случае, если PHP был собран с поддержкой этого расширения или же в том случае, если данное расширение подгружается во время выполнения.

Таблица 1. Net_Gopher constants

Constant | Value | Description
--- | --- | ---
`GOPHER_DOCUMENT` | 0 | Standard `text/plain` document.
`GOPHER_DIRECTORY` | 1 | A resource containing a gopher formatted directory listing.
`GOPHER_BINHEX` | 4 | A BinHex encoded binary file.
`GOPHER_DOSBINARY` | 5 | A DOS formatted binary archive.
`GOPHER_UUENCODED` | 6 | A UUEncoded file.
`GOPHER_BINARY` | 9 | A generic binary file.
`GOPHER_INFO` | 255 | An Informational entry
`GOPHER_HTTP` | 254 | A reference to an HTTP resource.
`GOPHER_UNKNOWN` | -1 | An unrecognized entry.

# Примеры

`<?php readfile("gopher://gopher.example.com/somedocument"); ?>`

add a note User Contributed Notes
Net_Gopher
There are no user contributed notes for this page.
gopher_parsedir gnupg_verify

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST