eyBuildLib API Reference : eyBuildLib

ebenviron

NAME

ebenviron - CGI environment variable

ROUTINES

initEnviron( ) - initilize environ struct with current environment
ebCgiInfo( ) - list current CGI environment.
ebgetenv( ) - get the value of envirement variable
getHttpHeader( ) - get the value of specified HTTP header name
getAuthType( ) - get auth type (AUTH_TYPE)
getContentLength( ) - get content length (CONTENT_LENGTH)
getContentType( ) - get content type (CONTENT_TYPE)
getGatewayInterface( ) - get gateway interface (GATEWAY_INTERFACE)
getPathInfo( ) - get path info (PATH_INFO)
getPathTranslated( ) - get path info (PATH_INFO)
getQueryString( ) - get questry string (QUERY_STRING)
getRemoteAddr( ) - get remote host IP Address or URL (REMOTE_ADDR)
getRemoteHost( ) - get remote host IP Address or URL (REMOTE_HOST)
getRemoteIdent( ) - get remote ident (REMOTE_IDENT)
getRemotePort( ) - get remote host port (REMOTE_PORT)
getRemoteUser( ) - get remote user (REMOTE_USER)
getRequestMethod( ) - get request method (REQUEST_METHOD)
getScriptName( ) - get script name (SCRIPT_NAME)
getServerAddr( ) - get server IP address (SERVER_ADDR)
getServerName( ) - get server name (SERVER_NAME)
getServerPort( ) - get server port (SERVER_PORT)
getServerProtocol( ) - get server protocol (SERVER_PROTOCOL)
getServerSoftware( ) - get server software (SERVER_SOFTWARE)
getHttpCookie( ) - get HTTP cookie list (HTTP_COOKIE)
getHttpConnection( ) - get connect state (HTTP_CONNECTION)
getHttpUserAgent( ) - get remote user agent (HTTP_USER_AGENT)
getHttpLastModified( ) - get the date last modified (HTTP_IF_MODIFIED_SINCE)
getHttpAccept( ) - get HTTP accept MIME type (HTTP_ACCEPT)
getHttpAcceptLanguage( ) - get browser accept language (HTTP_ACCEPT_LANGUAGE)
getHttpAcceptEncode( ) - get browser accept encode (HTTP_ACCEPT_ENCODING)

DESCRIPTION

CGI environment variable

INCLUDE

ebenviron.h


eyBuildLib : Routines

initEnviron( )

NAME

initEnviron( ) - initilize environ struct with current environment

SYNOPSIS

int initEnviron
    (
    EB_ENVIRON * penv
    )

DESCRIPTION

RETURN

OK/ERROR

SEE ALSO

ebenviron


eyBuildLib : Routines

ebCgiInfo( )

NAME

ebCgiInfo( ) - list current CGI environment.

SYNOPSIS

int ebCgiInfo
    (
    FILE * fp
    )

DESCRIPTION

list current CGI environment with HTML format

RETURN

OK/ERROR

SEE ALSO

ebenviron


eyBuildLib : Routines

ebgetenv( )

NAME

ebgetenv( ) - get the value of envirement variable

SYNOPSIS

char * ebgetenv
    (
    const char * varname
    )

DESCRIPTION

this routine called xgetenv( ). It will return "" is environment variable not exist instead return NULL.

RETURNS

A pointer to the string value, or pointer to const string ""

SEE ALSO

ebenviron, stdlib.h getenv( )


eyBuildLib : Routines

getHttpHeader( )

NAME

getHttpHeader( ) - get the value of specified HTTP header name

SYNOPSIS

char * getHttpHeader
    (
    const char * name
    )

DESCRIPTION

get the value of specified HTTP header name

SEE ALSO

ebenviron, dopost dopost( ), getPostItemValue( ), getPostSrcFileName( )


eyBuildLib : Routines

getAuthType( )

NAME

getAuthType( ) - get auth type (AUTH_TYPE)

SYNOPSIS

char * getAuthType (void)

DESCRIPTION

get auth type (AUTH_TYPE)

RETURN

pointer to auth type, or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getContentLength( )

NAME

getContentLength( ) - get content length (CONTENT_LENGTH)

SYNOPSIS

int getContentLength (void)

DESCRIPTION

get content length when method is POST (CONTENT_LENGTH)

RETURN

content length, or ERROR if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getContentType( )

NAME

getContentType( ) - get content type (CONTENT_TYPE)

SYNOPSIS

char * getContentType (void)

DESCRIPTION

get content type if method is POST (CONTENT_TYPE)

RETURN

pointer to content type, or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getGatewayInterface( )

NAME

getGatewayInterface( ) - get gateway interface (GATEWAY_INTERFACE)

SYNOPSIS

char * getGatewayInterface (void)

DESCRIPTION

get gateway interface (GATEWAY_INTERFACE)

RETURN

pointer to gateway interface, otherwise "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getPathInfo( )

NAME

getPathInfo( ) - get path info (PATH_INFO)

SYNOPSIS

char * getPathInfo (void)

DESCRIPTION

get path info (PATH_INFO) e.g.: =/cgi-bin/test.cgi

RETURN

pointer to path info, or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getPathTranslated( )

NAME

getPathTranslated( ) - get path info (PATH_INFO)

SYNOPSIS

char * getPathTranslated (void)

DESCRIPTION

get path info (PATH_INFO) e.g.: =/cgi-bin/test.cgi

RETURN

pointer to path info, or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getQueryString( )

NAME

getQueryString( ) - get questry string (QUERY_STRING)

SYNOPSIS

char * getQueryString (void)

DESCRIPTION

questry string (QUERY_STRING)

RETURN

pointer to questry string, or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getRemoteAddr( )

NAME

getRemoteAddr( ) - get remote host IP Address or URL (REMOTE_ADDR)

SYNOPSIS

char * getRemoteAddr (void)

DESCRIPTION

get remote host IP Address or URL (REMOTE_ADDR)

RETURN

pointer to remote address, or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getRemoteHost( )

NAME

getRemoteHost( ) - get remote host IP Address or URL (REMOTE_HOST)

SYNOPSIS

char * getRemoteHost (void)

DESCRIPTION

get remote host IP Address or URL (REMOTE_HOST)

RETURN

pointer to remote address, or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getRemoteIdent( )

NAME

getRemoteIdent( ) - get remote ident (REMOTE_IDENT)

SYNOPSIS

char * getRemoteIdent (void)

DESCRIPTION

get remote ident (REMOTE_IDENT), this value is not alway secure

RETURN

pointer to remote address, or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getRemotePort( )

NAME

getRemotePort( ) - get remote host port (REMOTE_PORT)

SYNOPSIS

short getRemotePort (void)

DESCRIPTION

get remote host port (REMOTE_PORT)

RETURN

remote host, or ERROR if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getRemoteUser( )

NAME

getRemoteUser( ) - get remote user (REMOTE_USER)

SYNOPSIS

char * getRemoteUser (void)

DESCRIPTION

get remote user (REMOTE_USER)

RETURN

pointer to remote user, or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getRequestMethod( )

NAME

getRequestMethod( ) - get request method (REQUEST_METHOD)

SYNOPSIS

char * getRequestMethod (void)

DESCRIPTION

get request method (REQUEST_METHOD)

RETURN

pointer to method, or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getScriptName( )

NAME

getScriptName( ) - get script name (SCRIPT_NAME)

SYNOPSIS

char * getScriptName (void)

DESCRIPTION

get script name (SCRIPT_NAME)

RETURN

pointer to script name, or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getServerAddr( )

NAME

getServerAddr( ) - get server IP address (SERVER_ADDR)

SYNOPSIS

char * getServerAddr (void)

DESCRIPTION

get server name (SERVER_NAME)

RETURN

pointer to server IP address, otherwise "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getServerName( )

NAME

getServerName( ) - get server name (SERVER_NAME)

SYNOPSIS

char * getServerName (void)

DESCRIPTION

get server name (SERVER_NAME)

RETURN

pointer to server name, otherwise "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getServerPort( )

NAME

getServerPort( ) - get server port (SERVER_PORT)

SYNOPSIS

short getServerPort (void)

DESCRIPTION

get server port (SERVER_PORT)

RETURN

remote host, or ERROR if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getServerProtocol( )

NAME

getServerProtocol( ) - get server protocol (SERVER_PROTOCOL)

SYNOPSIS

char * getServerProtocol (void)

DESCRIPTION

get server protocol (SERVER_PROTOCOL)

RETURN

pointer to server protocol, or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getServerSoftware( )

NAME

getServerSoftware( ) - get server software (SERVER_SOFTWARE)

SYNOPSIS

char * getServerSoftware (void)

DESCRIPTION

get server software (SERVER_SOFTWARE)

RETURN

pointer to server software, otherwise "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getHttpCookie( )

NAME

getHttpCookie( ) - get HTTP cookie list (HTTP_COOKIE)

SYNOPSIS

char * getHttpCookie (void)

DESCRIPTION

RETURN

pointer to cookie list , or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getHttpConnection( )

NAME

getHttpConnection( ) - get connect state (HTTP_CONNECTION)

SYNOPSIS

char * getHttpConnection (void)

DESCRIPTION

get connect state (HTTP_CONNECTION), such as "Keep-Alive"

RETURN

pointer to connection state , or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getHttpUserAgent( )

NAME

getHttpUserAgent( ) - get remote user agent (HTTP_USER_AGENT)

SYNOPSIS

char * getHttpUserAgent (void)

DESCRIPTION

get remote user agent (HTTP_USER_AGENT), for HTTP 1.1 e.g.: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)

RETURN

pointer to user agent, or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getHttpLastModified( )

NAME

getHttpLastModified( ) - get the date last modified (HTTP_IF_MODIFIED_SINCE)

SYNOPSIS

char * getHttpLastModified (void)

DESCRIPTION

get the date last modified (HTTP_IF_MODIFIED_SINCE)

RETURN

pointer to the date last modified , otherwise "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getHttpAccept( )

NAME

getHttpAccept( ) - get HTTP accept MIME type (HTTP_ACCEPT)

SYNOPSIS

char * getHttpAccept (void)

DESCRIPTION

RETURN

pointer to the accept MIME type, or "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getHttpAcceptLanguage( )

NAME

getHttpAcceptLanguage( ) - get browser accept language (HTTP_ACCEPT_LANGUAGE)

SYNOPSIS

char * getHttpAcceptLanguage (void)

DESCRIPTION

get browser accept language (HTTP_ACCEPT_LANGUAGE)

RETURN

pointer to the accept language, otherwise "" if not found

SEE ALSO

ebenviron


eyBuildLib : Routines

getHttpAcceptEncode( )

NAME

getHttpAcceptEncode( ) - get browser accept encode (HTTP_ACCEPT_ENCODING)

SYNOPSIS

char * getHttpAcceptEncode (void)

DESCRIPTION

get browser accept encode (HTTP_ACCEPT_ENCODING)

RETURN

pointer to the accept encode, otherwise "" if not found

SEE ALSO

ebenviron