HTTPProxy()
Syntax
HTTPProxy(URL$ [, User$, Password$])Description
Specify a proxy to use for the following HTTP commands: GetHTTPHeader(), ReceiveHTTPFile() and ReceiveHTTPMemory().
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 resolvingUser$, Password$ (optional) The user and password to use to connect to the proxy (if any).
Return value
None.
Remarks
InitNetwork() has to be called before using this command.
On Linux, 'libcurl' needs to be installed to have this command working (most of Linux distributions comes with it already installed).
Example
InitNetwork() 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
GetHTTPHeader(), ReceiveHTTPFile(), ReceiveHTTPMemory()
Supported OS
All