class file_downloader

Properties

protected string $error_string
protected int $error_number

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
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

at line 108
string get_error_string()

Get error string

Return Value

string

Error string

at line 118
int get_error_number()

Get error number

Return Value

int

Error number