HTTPProxy()

Syntax

HTTPProxy(URL$ [, User$, Password$])
Description
Specify a proxy to use for the following HTTP commands: ReceiveHTTPFile(), ReceiveHTTPMemory(), HTTPRequest() and HTTPRequestMemory().

Parameters

URL$ The URL to use for the proxy. Default is HTTP proxy if no prefix is specified. Available prefixes to specify proxy type:
  http://    - HTTP proxy (default)
  socks4://  - SOCKS4 proxy
  socks4a:// - SOCKS4 proxy with domain name support rather than IP address
  socks5://  - SOCKS5 proxy
  socks5h:// - SOCKS5 proxy and ask the proxy to do the hostname resolving
User$, Password$ (optional) The user and password to use to connect to the proxy (if any).

Return value

None.

Remarks

On Linux, 'libcurl' needs to be installed to have this command working (most of Linux distributions comes with it already installed).

Example

  HTTPProxy("socks4://127.0.0.1")

  Filename$ = SaveFileRequester("Where to save index.php ?", "", "", 0)

  If ReceiveHTTPFile("http://www.purebasic.com/index.php", Filename$)
    Debug "Success"
  Else
    Debug "Failed"
  EndIf

See Also

ReceiveHTTPFile(), ReceiveHTTPMemory(), HTTPRequest(), HTTPRequestMemory()

Supported OS

All

<- HTTPProgress() - Http Index - HTTPRequest() ->