<<

. 108
( 132 .)



>>

bcmul(string left_operand,
arbitrary-precision numbers
string right_operand
(multiplication)
[, int scale])

string Returns the quotient of two
bcdiv(string left_operand,
arbitrary-precision numbers
string right_operand
(division)
[, int scale])

string Returns the modulus of the
bcmod(string left_operand,
two arbitrary-precision
string right_operand)
operands
string Returns the value of an
bcpow(string x, string y
arbitrary-precision number
[, int scale])
raised to the power of
another
string Returns the square root of
bcsqrt(string operand
an arbitrary-precision
[, int scale])
number
string Compares two arbitrary-
bccomp(string left_operand,
precision numbers
string right_operand
[, int scale])

string Sets the default scale
bcscale(int scale)
parameter for all BC math
functions
Appendix F: PHP Function Reference 641


TABLE F-23 CURL FUNCTIONS

Function Return Value Action

string Returns the CURL version
curl_version(void)
string
int Initializes a CURL session
curl_init([string url])

bool Sets an option for a CURL
curl_setopt(int ch, string
transfer
option, mixed value)

bool Performs a CURL session
curl_exec(int ch)

string Gets information regarding a
curl_getinfo(int ch, int opt)
specific transfer
string Returns a string containing
curl_error(int ch)
the last error for the current
session
int Returns an integer
curl_errno(int ch)
containing the last error
number for the current
session
void Closes a CURL session
curl_close(int ch)




TABLE F-24 FTP FUNCTIONS

Function Return Value Action

resource Opens an FTP stream
ftp_connect(string host
[, int port [, int timeout)]])

bool Logs in to the FTP server
ftp_login(resource stream,
string username, string
password)

string Returns the present working
ftp_pwd(resource stream)
directory
bool Changes to the parent
ftp_cdup(resource stream)
directory
Continued
642 Part V: Appendixes


TABLE F-24 FTP FUNCTIONS (Continued)

Function Return Value Action

bool Changes directories
ftp_chdir(resource stream,
string directory)

bool Requests execution of a
ftp_exec(resource stream,
program on the FTP server
string command)

string Creates a directory and
ftp_mkdir(resource stream,
returns the absolute path for
string directory)
the new directory, or false
on error
bool Removes a directory
ftp_rmdir(resource stream,
string directory)

array Returns an array of file
ftp_nlist(resource stream,
names in the given directory
string directory)

array Returns a detailed listing of
ftp_rawlist(resource stream,
a directory as an array of
string directory)
output lines
string Returns the system-type
ftp_systype(resource stream)
identifier
bool Retrieves a file from the FTP
ftp_fget(resource stream,
server and writes it to an
resource fp, string
open file
remote_file, int mode)

bool Turns passive mode on or off
ftp_pasv(resource stream,
bool pasv)

bool Retrieves a file from the FTP
ftp_get(resource stream,
server and writes it to a
string local_file, string
local file
remote_file, int mode)

bool Stores a file from an open
ftp_fput(resource stream,
file to the FTP server
string remote_file, resource
fp, int mode)

bool Stores a file on the FTP
ftp_put(resource stream,
server
string remote_file, string
local_file, int mode)
Appendix F: PHP Function Reference 643



Function Return Value Action

int Returns the size of the file,
ftp_size(resource stream,
or “1 on error
string filename)

int Returns the last
ftp_mdtm(resource stream,
modification time for the
string filename)
file, or “1 on error
bool Renames the given file to a
ftp_rename(resource stream,
new path
string src, string dest)

bool Deletes a file
ftp_delete(resource stream,
string file)

bool Sends a SITE command to
ftp_site(resource stream,
the server
string cmd)

void Closes the FTP stream
ftp_close(resource stream)

bool Sets an FTP option
ftp_set_option(resource stream,
int option, mixed value)

mixed Gets an FTP option
ftp_get_option(resource stream,
int option)




TABLE F-25 CYBERCASH FUNCTIONS

Function Return Value Action

array CyberCash encrypt
cybercash_encr(string wmk,
string sk, string data)

array CyberCash decrypt
cybercash_decr(string wmp,
string sk, string data)

string base64 encode data for
cybercash_base64_encode(string
CyberCash
data)

string base64 decode data for
cybercash_base64_decode(string
CyberCash
data)
644 Part V: Appendixes


TABLE F-26 GD FUNCTIONS

Function Return Value Action

int Loads a new font
imageloadfont(string filename)

void Sets the line-drawing styles
imagesetstyle(resource im,
for use with imageline()
array styles)
and IMG_COLOR_STYLED
int Creates a new true-color
imagecreatetruecolor(int x_size,
image
int y_size)

void Converts a true-color image
imagetruecolortopalette(resource
to a palette-based image
im, bool ditherFlag,
with a number of colors,
int colorsWanted)
optionally using dithering
void Sets line thickness for
imagesetthickness(resource
drawing lines, ellipses,
im, int thickness)
rectangles, polygons,
and so on
void Draws an ellipse
imageellipse(resource im, int
cx, int cy, int w, int h, int
color)

void Draws a filled ellipse

<<

. 108
( 132 .)



>>