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.
요구 조건
설치
Prerequisite: PHP 4.3.0 or higher.
PECL 확장 설치에 관한 정보는 매뉴얼의 PECL 확장 설치에 있습니다. 새 릴리즈, 내려받기, 소스파일, 개발자 정보, CHANGELOG 등의 추가 정보는 여기에 있습니다: » https://pecl.php.net/package/net_gopher
실행시 설정
이 확장은 php.ini 설정이 존재하지 않습니다.
자원형
이 확장은 리소스형을 정의하지 않습니다.
예약 상수
이 확장은 다음의 상수들을 정의합니다. 이 확장을 PHP에 내장했거나, 실행시에 동적으로 읽어들일 경우에만 사용할 수 있습니다.
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");
?>