phpBB API Documentation
Class

phpbb\file_downloader

class file_downloader

Methods

mixed get(string $host, string $directory, string $filename, int $port = 80, int $timeout = 6)

Retrieve contents from remotely stored file

string get_error_string()

Get error string

int get_error_number()

Get error number

Details

at line 39
public mixed get(string $host, string $directory, string $filename, int $port = 80, int $timeout = 6)

Retrieve contents from remotely stored file

Parameters

string $host File host
string $directory Directory file is in
string $filename Filename of file to retrieve
int $port Port to connect to; default: 80
int $timeout Connection timeout in seconds; default: 6

Return Value

mixed File data as string if file can be read and there is no timeout, false if there were errors or the connection timed out

Exceptions

runtime_exception If data can't be retrieved and no error message is returned

at line 106
public string get_error_string()

Get error string

Return Value

string Error string

at line 116
public int get_error_number()

Get error number

Return Value

int Error number