Previous | Next

GetProxy Method

Retrieves the proxy server information for the specified network protocol.

String GetProxy(
     Integer protocolId,
     Integer field
)

Parameters

protocolId
Type: Integer
The network protocol ID for which the proxy server information is to be retrieved. Valid network protocol IDs are:

  • 0 - HTTP protocol
  • 1 - HTTPS protocol (secure HTTP, HTTP over SSL)
  • 2 - FTP protocol
  • 3 - Secure FTP, FTP over SSL

field
Type: Integer
The type of information to retrieve:

  • 0 - Proxy server (host:port)
  • 1 - Proxy user name
  • 2 - Proxy password
  • 3 - Proxy method (For the possible values returned, see the SetProxy method)

Return Value

Type: String

If the method succeeds, the return value is the proxy information specified with the field parameter. If the method fails, the return value is "-1". To get extended error information, call GetLastError and GetLastErrorDesc methods.

Remarks

The default proxy settings are taken from the proxy settings in Microsoft Internet Explorer.