PHP-Manual *php-manual* Created on 2004-11-21, 13:34:58 ============================================================================== Apache *php-apache* *apache_child_terminate()* > bool apache_child_terminate() |apache_child_terminate| will register the Apache process executing the current PHP request for termination once execution of PHP code it is completed. It may be used to terminate a process after a script with high memory consumption has been run as memory will usually only be freed internally but not given back to the operating system. *apache_get_modules()* > array apache_get_modules() This function returns an array with the loaded Apache modules. *apache_get_version()* > string apache_get_version() |apache_get_version| returns the version of Apache as string, or FALSE on failure. *apache_getenv()* > string apache_getenv(string variable [, bool walk_to_top]) |apache_getenv| returns the value of the Apache environment variable specified by {variable}, or FALSE on failure. *apache_lookup_uri()* > object apache_lookup_uri(string filename) This performs a partial request for a URI. It goes just far enough to obtain all the important information about the given resource and returns this information in a class. The properties of the returned class are: status the_request status_line method content_type handler uri filename path_info args boundary no_cache no_local_copy allowed send_bodyct bytes_sent byterange clength unparsed_uri mtime request_time *apache_note()* > string apache_note(string note_name [, string note_value]) |apache_note| is an Apache-specific function which gets and sets values in a request's notes table. If called with one argument, it returns the current value of note note_name. If called with two arguments, it sets the value of note note_name to note_value and returns the previous value of note note_name. *apache_request_headers()* > array apache_request_headers() |apache_request_headers| returns an associative array of all the HTTP headers in the current request. This is only supported when PHP runs as an Apache module. *apache_response_headers()* > array apache_response_headers() Returns an array of all Apache response headers. *apache_setenv()* > int apache_setenv(string variable, string value [, bool walk_to_top]) |apache_setenv| sets the value of the Apache environment variable specified by {variable}. *ascii2ebcdic()* > int ascii2ebcdic(string ascii_str) |ascii2ebcdic| is an Apache-specific function which is available only on EBCDIC based operating systems (OS/390, BS2000). It translates the ASCII encoded string {ascii_str} to its equivalent EBCDIC representation (binary safe), and returns the result. *ebcdic2ascii()* > int ebcdic2ascii(string ebcdic_str) |ebcdic2ascii| is an Apache-specific function which is available only on EBCDIC based operating systems (OS/390, BS2000). It translates the EBCDIC encoded string {ebcdic_str} to its equivalent ASCII representation (binary safe), and returns the result. *getallheaders()* > array getallheaders() |getallheaders| is an alias for |apache_request_headers|. It will return an associative array of all the HTTP headers in the current request. Please read the |apache_request_headers| documentation for more information on how this function works. *virtual()* > int virtual(string filename) |virtual| is an Apache-specific function which is equivalent to in mod_include. It performs an Apache sub-request. It is useful for including CGI scripts or .shtml files, or anything else that you would parse through Apache. Note that for a CGI script, the script must generate valid CGI headers. At the minimum that means it must generate a Content-type header. ============================================================================== Apd *php-apd* *apd_breakpoint()* > void apd_breakpoint(int debug_level) This can be used to stop the running of your script, and await responses on the connected socket. To step the program, just send enter (a blank line), or enter a php command to be executed. A typical session using tcplisten would look like this. *apd_callstack()* > array apd_callstack() Returns the current call stack as an array *apd_clunk()* > void apd_clunk(string warning [, string delimiter]) Behaves like perl's Carp::cluck. Throw a warning and a callstack. The default line delimiter is "
\n". *apd_continue()* > void apd_continue(int debug_level) Usually sent via the socket to restart the interpreter. *apd_croak()* > void apd_croak(string warning [, string delimiter]) Behaves like perl's Carp::croak. Throw an error, a callstack and then exit. The default line delimiter is "
\n". *apd_dump_function_table()* > void apd_dump_function_table() Outputs the current function table. *apd_dump_persistent_resources()* > array apd_dump_persistent_resources() Return all persistent resources as an array. *apd_dump_regular_resources()* > array apd_dump_regular_resources() Return all current regular resources as an array. *apd_echo()* > void apd_echo(string output) Usually sent via the socket to request information about the running script. *apd_get_active_symbols()* > array apd_get_active_symbols() Returns the names of all the variables defined in the active scope, (not their values) *apd_set_pprof_trace()* > void apd_set_pprof_trace( [string dump_directory]) Starts debugging to {dump_directory}/pprof_{process_id}, if dump_directory is not set, then the apd.dumpdir setting from the php.ini file is used. *apd_set_session_trace()* > void apd_set_session_trace(int debug_level [, string dump_directory]) Starts debugging to {dump_directory}/apd_dump_{process_id}, if dump_directory is not set, then the apd.dumpdir setting from the php.ini file is used. *apd_set_session()* > void apd_set_session(int debug_level) This can be used to increase or decrease debugging in a different area of your application,.debug_level is an integer which is formed by adding together the following values: *apd_set_socket_session_trace()* > bool apd_set_socket_session_trace(int socket_type, int port, int debug_level) Connects to the tcp server (eg. tcplisten) specified IP or Unix Domain socket (like a file), and sends debugging data to the socket. You can use any port, but higher numbers are better as most of the lower numbers may be used by other system services. *override_function()* > bool override_function(string function_name, string function_args, string function_code) Syntax similar to create_function(). Overrides built-in functions (replaces them in the symbol table). *rename_function()* > bool rename_function(string original_name, string new_name) Renames orig_name to new_name in the global function_table. Useful for temporarily overriding builtin functions. ============================================================================== Array *php-array* *array_change_key_case()* > array array_change_key_case(array input [, int case]) |array_change_key_case| changes the keys in the {input} array to be all lowercase or uppercase. The change depends on the last optional {case} parameter. You can pass two constants there, CASE_UPPER and CASE_LOWER. The default is CASE_LOWER. The function will leave number indices as is. *array_chunk()* > array array_chunk(array input, int size [, bool preserve_keys]) |array_chunk| splits the array into several arrays with {size} values in them. You may also have an array with less values at the end. You get the arrays as members of a multidimensional array indexed with numbers starting from zero. *array_combine()* > array array_combine(array keys, array values) Returns an array by using the values from the {keys} array as keys and the values from the {values} array as the corresponding values. *array_count_values()* > array array_count_values(array input) |array_count_values| returns an array using the values of the {input} array as keys and their frequency in {input} as values. *array_diff_assoc()* > array array_diff_assoc(array array1, array array2) |array_diff_assoc| returns an array containing all the values from {array1} that are not present in any of the other arguments. Note that the keys are used in the comparison unlike |array_diff|. *array_diff_key()* > array array_diff_key(array array1, array array2) |array_diff_key| returns an array containing all the values of {array1} that have keys that are not present in any of the other arguments. Note that the associativity is preserved. This function is like |array_diff| except the comparison is done on the keys instead of the values. *array_diff_uassoc()* > array array_diff_uassoc(array array1, array array2, callback key_compare_func) |array_diff_uassoc| returns an array containing all the values from {array1} that are not present in any of the other arguments. Note that the keys are used in the comparison unlike |array_diff|. This comparison is done by a user supplied callback function. It must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. This is unlike |array_diff_assoc| where an internal function for comparing the indices is used. *array_diff_ukey()* > array array_diff_ukey(array array1, array array2, callback key_compare_func) |array_diff_ukey| returns an array containing all the values of {array1} that have keys that are not present in any of the other arguments. Note that the associativity is preserved. This function is like |array_diff| except the comparison is done on the keys instead of the values. *array_diff()* > array array_diff(array array1, array array2) |array_diff| returns an array containing all the values of {array1} that are not present in any of the other arguments. Note that keys are preserved. *array_fill()* > array array_fill(int start_index, int num, mixed value) |array_fill| fills an array with {num} entries of the value of the {value} parameter, keys starting at the {start_index} parameter. Note that num must be a number greater than zero, or PHP will throw a warning. *array_filter()* > array array_filter(array input [, callback callback]) |array_filter| iterates over each value in the {input} array passing them to the {callback} function. If the callback function returns true, the current value from {input} is returned into the result array. Array keys are preserved. *array_flip()* > array array_flip(array trans) |array_flip| returns an array in flip order, i.e. keys from {trans} become values and values from {trans} become keys. *array_intersect_assoc()* > array array_intersect_assoc(array array1, array array2) |array_intersect_assoc| returns an array containing all the values of {array1} that are present in all the arguments. Note that the keys are used in the comparison unlike in |array_intersect|. *array_intersect_key()* > array array_intersect_key(array array1, array array2) |array_intersect_key| returns an array containing all the values of {array1} which have matching keys that are present in all the arguments. *array_intersect_uassoc()* > array array_intersect_uassoc(array array1, array array2, callback key_compare_func) |array_intersect_uassoc| returns an array containing all the values of {array1} that are present in all the arguments. Note that the keys are used in the comparison unlike in |array_intersect|. *array_intersect_ukey()* > array array_intersect_ukey(array array1, array array2, callback key_compare_func) |array_intersect_ukey| returns an array containing all the values of {array1} which have matching keys that are present in all the arguments. *array_intersect()* > array array_intersect(array array1, array array2) |array_intersect| returns an array containing all the values of {array1} that are present in all the arguments. Note that keys are preserved. *array_key_exists()* > bool array_key_exists(mixed key, array search) |array_key_exists| returns TRUE if the given {key} is set in the array. {key} can be any value possible for an array index. |array_key_exists| also works on objects. *array_keys()* > array array_keys(array input [, mixed search_value [, bool strict]]) |array_keys| returns the keys, numeric and string, from the {input} array. *array_map()* > array array_map(callback callback, array arr1) |array_map| returns an array containing all the elements of {arr1} after applying the {callback} function to each one. The number of parameters that the {callback} function accepts should match the number of arrays passed to the |array_map| *array_merge_recursive()* > array array_merge_recursive(array array1, array array2) |array_merge_recursive| merges the elements of two or more arrays together so that the values of one are appended to the end of the previous one. It returns the resulting array. *array_merge()* > array array_merge(array array1 [, array array2]) |array_merge| merges the elements of one or more arrays together so that the values of one are appended to the end of the previous one. It returns the resulting array. *array_multisort()* > bool array_multisort(array ar1 [, mixed arg]) Returns TRUE on success or FALSE on failure.; *array_pad()* > array array_pad(array input, int pad_size, mixed pad_value) |array_pad| returns a copy of the {input} padded to size specified by {pad_size} with value {pad_value}. If {pad_size} is positive then the array is padded on the right, if it's negative then on the left. If the absolute value of {pad_size} is less than or equal to the length of the {input} then no padding takes place. *array_pop()* > mixed array_pop() |array_pop| pops and returns the last value of the {array}, shortening the {array} by one element. If {array} is empty (or is not an array), NULL will be returned. *array_push()* > int array_push(mixed var) |array_push| treats {array} as a stack, and pushes the passed variables onto the end of {array}. The length of {array} increases by the number of variables pushed. Has the same effect as: ]]> repeated for each {var}. *array_rand()* > mixed array_rand(array input [, int num_req]) |array_rand| is rather useful when you want to pick one or more random entries out of an array. It takes an {input} array and an optional argument {num_req} which specifies how many entries you want to pick - if not specified, it defaults to 1. *array_reduce()* > mixed array_reduce(array input, callback function [, int initial]) |array_reduce| applies iteratively the {function} function to the elements of the array {input}, so as to reduce the array to a single value. If the optional {initial} is available, it will be used at the beginning of the process, or as a final result in case the array is empty. *array_reverse()* > array array_reverse(array array [, bool preserve_keys]) |array_reverse| takes input {array} and returns a new array with the order of the elements reversed, preserving the keys if {preserve_keys} is TRUE. *array_search()* > mixed array_search(mixed needle, array haystack [, bool strict]) Searches {haystack} for {needle} and returns the key if it is found in the array, FALSE otherwise. *array_shift()* > mixed array_shift() |array_shift| shifts the first value of the {array} off and returns it, shortening the {array} by one element and moving everything down. All numerical array keys will be modified to start counting from zero while literal keys won't be touched. If {array} is empty (or is not an array), NULL will be returned. *array_slice()* > array array_slice(array array, int offset [, int length [, bool preserve_keys]]) |array_slice| returns the sequence of elements from the array {array} as specified by the {offset} and {length} parameters. *array_splice()* > array array_splice(int offset [, int length [, array replacement]]) |array_splice| removes the elements designated by {offset} and {length} from the {input} array, and replaces them with the elements of the {replacement} array, if supplied. It returns an array containing the extracted elements. *array_sum()* > number array_sum(array array) |array_sum| returns the sum of values in an array as an integer or float. *array_udiff_assoc()* > array array_udiff_assoc(array array1, array array2, callback data_compare_func) |array_udiff_assoc| returns an array containing all the values from {array1} that are not present in any of the other arguments. Note that the keys are used in the comparison unlike |array_diff| and |array_udiff|. The comparison of arrays' data is performed by using an user-supplied callback. In this aspect the behaviour is opposite to the behaviour of |array_diff_assoc| which uses internal function for comparison. *array_udiff_uassoc()* > array array_udiff_uassoc(array array1, array array2, callback data_compare_func, callback key_compare_func) |array_udiff_uassoc| returns an array containing all the values from {array1} that are not present in any of the other arguments. Note that the keys are used in the comparison unlike |array_diff| and |array_udiff|. The comparison of arrays' data is performed by using an user-supplied callback : {data_compare_func}. In this aspect the behaviour is opposite to the behaviour of |array_diff_assoc| which uses internal function for comparison. The comparison of keys (indices) is done also by the callback function {key_compare_func}. This behaviour is unlike what |array_udiff_assoc| does, since the latter compares the indices by using an internal function. *array_udiff()* > array array_udiff(array array1, array array2, callback data_compare_func) |array_udiff| returns an array containing all the values of {array1} that are not present in any of the other arguments. Note that keys are preserved. For the comparison of the data {data_compare_func} is used. It must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. This is unlike |array_diff| which uses an internal function for comparing the data. *array_uintersect_assoc()* > array array_uintersect_assoc(array array1, array array2, callback data_compare_func) |array_uintersect_assoc| returns an array containing all the values of {array1} that are present in all the arguments. Note that the keys are used in the comparison unlike in |array_uintersect|. The data is compared by using a callback function. *array_uintersect_uassoc()* > array array_uintersect_uassoc(array array1, array array2, callback data_compare_func, callback key_compare_func) |array_uintersect_uassoc| returns an array containing all the values of {array1} that are present in all the arguments. Note that the keys are used in the comparison unlike in |array_uintersect|. Both the data and the indexes are compared by using a callback functions. *array_uintersect()* > array array_uintersect(array array1, array array2, callback data_compare_func) |array_uintersect| returns an array containing all the values of {array1} that are present in all the arguments. The data is compared by using a callback function. *array_unique()* > array array_unique(array array) |array_unique| takes input {array} and returns a new array without duplicate values. *array_unshift()* > int array_unshift(mixed var) |array_unshift| prepends passed elements to the front of the {array}. Note that the list of elements is prepended as a whole, so that the prepended elements stay in the same order. All numerical array keys will be modified to start counting from zero while literal keys won't be touched. *array_values()* > array array_values(array input) |array_values| returns all the values from the {input} array and indexes numerically the array. *array_walk_recursive()* > bool array_walk_recursive(callback funcname [, mixed userdata]) Applies the user-defined function {funcname} to each element of the {input} array. This function will recur into deeper arrays. Typically, {funcname} takes on two parameters. The {input} parameter's value being the first, and the key/index second. If the optional {userdata} parameter is supplied, it will be passed as the third parameter to the callback {funcname}. *array_walk()* > bool array_walk(callback funcname [, mixed userdata]) Returns TRUE on success or FALSE on failure.; *array()* > array array() Returns an array of the parameters. The parameters can be given an index with the => operator. Read the section on the array type for more information on what an array is. *arsort()* > bool arsort( [int sort_flags]) This function sorts an array such that array indices maintain their correlation with the array elements they are associated with. This is used mainly when sorting associative arrays where the actual element order is significant. *asort()* > bool asort( [int sort_flags]) This function sorts an array such that array indices maintain their correlation with the array elements they are associated with. This is used mainly when sorting associative arrays where the actual element order is significant. *compact()* > array compact(mixed varname) |compact| takes a variable number of parameters. Each parameter can be either a string containing the name of the variable, or an array of variable names. The array can contain other arrays of variable names inside it; |compact| handles it recursively. *count()* > int count(mixed var [, int mode]) Returns the number of elements in {var}, which is typically an array, since anything other than objects will have one element. *current()* > mixed current() Every array has an internal pointer to its "current" element, which is initialized to the first element inserted into the array. *each()* > array each() Returns the current key and value pair from the array {array} and advances the array cursor. This pair is returned in a four-element array, with the keys 0, 1, key, and value. Elements 0 and key contain the key name of the array element, and 1 and value contain the data. *end()* > mixed end() |end| advances {array}'s internal pointer to the last element, and returns its value. *extract()* > int extract(array var_array [, int extract_type [, string prefix]]) This function is used to import variables from an array into the current symbol table. It takes an associative array {var_array} and treats keys as variable names and values as variable values. For each key/value pair it will create a variable in the current symbol table, subject to {extract_type} and {prefix} parameters. *in_array()* > bool in_array(mixed needle, array haystack [, bool strict]) Searches {haystack} for {needle} and returns TRUE if it is found in the array, FALSE otherwise. *key()* > mixed key() |key| returns the index element of the current array position. *krsort()* > bool krsort( [int sort_flags]) Sorts an array by key in reverse order, maintaining key to data correlations. This is useful mainly for associative arrays. *ksort()* > bool ksort( [int sort_flags]) Sorts an array by key, maintaining key to data correlations. This is useful mainly for associative arrays. *list()* > void list(mixed varname) Like |array|, this is not really a function, but a language construct. |list| is used to assign a list of variables in one operation. *natcasesort()* > void natcasesort() This function implements a sort algorithm that orders alphanumeric strings in the way a human being would while maintaining key/value associations. This is described as a "natural ordering". *natsort()* > void natsort() This function implements a sort algorithm that orders alphanumeric strings in the way a human being would while maintaining key/value associations. This is described as a "natural ordering". An example of the difference between this algorithm and the regular computer string sorting algorithms (used in |sort|) can be seen below: *next()* > mixed next() Returns the array value in the next place that's pointed to by the internal array pointer, or FALSE if there are no more elements. *pos()* > void pos() This function is an alias of |current|. *prev()* > mixed prev() Returns the array value in the previous place that's pointed to by the internal array pointer, or FALSE if there are no more elements. If the array contains empty elements then this function will return FALSE for these elements as well. To properly traverse an array which may contain empty elements see the |each| function. *range()* > array range(number low, number high [, number step]) |range| returns an array of elements from {low} to {high}, inclusive. If low > high, the sequence will be from high to low. *reset()* > mixed reset() |reset| rewinds {array}'s internal pointer to the first element and returns the value of the first array element, or FALSE if the array is empty. *rsort()* > bool rsort( [int sort_flags]) This function sorts an array in reverse order (highest to lowest). *shuffle()* > bool shuffle() This function shuffles (randomizes the order of the elements in) an array. |shuffle| example ]]> *sizeof()* > void sizeof() This function is an alias of |count|. *sort()* > bool sort( [int sort_flags]) This function sorts an array. Elements will be arranged from lowest to highest when this function has completed. *uasort()* > bool uasort(callback cmp_function) This function sorts an array such that array indices maintain their correlation with the array elements they are associated with. This is used mainly when sorting associative arrays where the actual element order is significant. The comparison function is user-defined. *uksort()* > bool uksort(callback cmp_function) |uksort| will sort the keys of an array using a user-supplied comparison function. If the array you wish to sort needs to be sorted by some non-trivial criteria, you should use this function. *usort()* > bool usort(callback cmp_function) This function will sort an array by its values using a user-supplied comparison function. If the array you wish to sort needs to be sorted by some non-trivial criteria, you should use this function. ============================================================================== Aspell *php-aspell* *aspell_check_raw()* > bool aspell_check_raw(int dictionary_link, string word) |aspell_check_raw| checks the spelling of a word, without changing its case or trying to trim it in any way and returns TRUE if the spelling is correct, FALSE if not. *aspell_check()* > bool aspell_check(int dictionary_link, string word) |aspell_check| checks the spelling of a word and returns TRUE if the spelling is correct, FALSE if not. *aspell_new()* > int aspell_new(string master [, string personal]) |aspell_new| opens up a new dictionary and returns the dictionary link identifier for use in other aspell functions. Returns FALSE on error. *aspell_suggest()* > array aspell_suggest(int dictionary_link, string word) |aspell_suggest| returns an array of possible spellings for the given word. ============================================================================== Bc *php-bc* *bcadd()* > string bcadd(string left_operand, string right_operand [, int scale]) Adds the {left_operand} to the {right_operand} and returns the sum in a string. The optional {scale} parameter is used to set the number of digits after the decimal place in the result. *bccomp()* > int bccomp(string left_operand, string right_operand [, int scale]) Compares the {left_operand} to the {right_operand} and returns the result as an integer. The optional {scale} parameter is used to set the number of digits after the decimal place which will be used in the comparison. The return value is 0 if the two operands are equal. If the {left_operand} is larger than the {right_operand} the return value is +1 and if the {left_operand} is less than the {right_operand} the return value is -1. *bcdiv()* > string bcdiv(string left_operand, string right_operand [, int scale]) Divides the {left_operand} by the {right_operand} and returns the result. The optional {scale} sets the number of digits after the decimal place in the result. *bcmod()* > string bcmod(string left_operand, string modulus) Get the modulus of the {left_operand} using {modulus}. *bcmul()* > string bcmul(string left_operand, string right_operand [, int scale]) Multiply the {left_operand} by the {right_operand} and returns the result. The optional {scale} sets the number of digits after the decimal place in the result. *bcpow()* > string bcpow(string x, string y [, int scale]) Raise {x} to the power {y}. The optional {scale} can be used to set the number of digits after the decimal place in the result. *bcpowmod()* > string bcpowmod(string x, string y, string modulus [, int scale]) Use the fast-exponentiation method to raise {x} to the power {y} with respect to the modulus {modulus}. The optional {scale} can be used to set the number of digits after the decimal place in the result. *bcscale()* > bool bcscale(int scale) This function sets the default scale parameter for all subsequent bc math functions that do not explicitly specify a scale parameter. Returns TRUE on success or FALSE on failure.; *bcsqrt()* > string bcsqrt(string operand [, int scale]) Return the square root of the {operand}. The optional {scale} parameter sets the number of digits after the decimal place in the result. *bcsub()* > string bcsub(string left_operand, string right_operand [, int scale]) Subtracts the {right_operand} from the {left_operand} and returns the result in a string. The optional {scale} parameter is used to set the number of digits after the decimal place in the result. ============================================================================== Bcompiler *php-bcompiler* *bcompiler_load_exe()* > bool bcompiler_load_exe(string filename) Reads data from a bcompiler exe file and creates classes from the bytecodes *bcompiler_load()* > bool bcompiler_load(string filename) Reads data from a bzcompressed file and creates classes from the bytecodes *bcompiler_parse_class()* > bool bcompiler_parse_class(string class, string callback) reads the bytecodes of a class and calls back to a user function *bcompiler_read()* > bool bcompiler_read(resource filehandle) Reads data from a open file handle and creates classes from the bytecodes *bcompiler_write_class()* > bool bcompiler_write_class(resource filehandle, string className [, string extends]) This reads the bytecodes from PHP for an existing class, and writes them to the open file handle, It does not perform dependency checking, so make sure you write the classes in an order that will not result in an 'undefined class' occurring when you load it. *bcompiler_write_constant()* > bool bcompiler_write_constant(resource filehandle, string constantName) This function reads the bytecodes from PHP for an existing constant, and writes them to the open file handle. *bcompiler_write_exe_footer()* > bool bcompiler_write_exe_footer(resource filehandle, int startpos) An EXE (or self executable) file consists of 3 parts, *bcompiler_write_footer()* > bool bcompiler_write_footer(resource filehandle) Writes the a single character \x00 to indicate End of compiled data *bcompiler_write_function()* > bool bcompiler_write_function(resource filehandle, string functionName) This reads the bytecodes from PHP for an existing function, and writes them to the open file handle. Order is not important, (eg. if function b uses function a, and you compile it like the example below, it will work perfectly OK) *bcompiler_write_functions_from_file()* > bool bcompiler_write_functions_from_file(resource filehandle, string fileName) This function searches for all functions declared in the given file, and writes their correspondent bytecodes to the open file handle. Always remember to include/require the file you intend to compile. *bcompiler_write_header()* > bool bcompiler_write_header(resource filehandle [, string write_ver]) Writes the header part of a bcompiler file. ============================================================================== Bzip2 *php-bzip2* *bzclose()* > int bzclose(resource bz) Closes the bzip2 file referenced by the pointer {bz}. *bzcompress()* > string bzcompress(string source [, int blocksize [, int workfactor]]) |bzcompress| compresses the {source} string and returns it as bzip2 encoded data. *bzdecompress()* > string bzdecompress(string source [, int small]) |bzdecompress| decompresses the {source} string containing bzip2 encoded data and returns it. If the optional parameter {small} is TRUE, an alternative decompression algorithm will be used which uses less memory (the maximum memory requirement drops to around 2300K) but works at roughly half the speed. See the bzip2 documentation for more information about this feature. *bzerrno()* > int bzerrno(resource bz) Returns the error number of any bzip2 error returned by the file pointer {bz}. *bzerror()* > array bzerror(resource bz) Returns the error number and error string, in an associative array, of any bzip2 error returned by the file pointer {bz}. *bzerrstr()* > string bzerrstr(resource bz) Returns the error string of any bzip2 error returned by the file pointer {bz}. *bzflush()* > int bzflush(resource bz) Forces a write of all buffered bzip2 data for the file pointer {bz}. *bzopen()* > resource bzopen(string filename, string mode) |bzopen| opens a bzip2 (.bz2) file for reading or writing. {filename} is the name of the file to open. {mode} is similar to the |fopen| function (`r' for read, `w' for write, etc.). *bzread()* > string bzread(resource bz [, int length]) |bzread| reads up to {length} bytes from the bzip2 file pointer referenced by {bz}. Reading stops when {length} (uncompressed) bytes have been read or EOF is reached, whichever comes first. If the optional parameter {length} is not specified, |bzread| will read 1024 (uncompressed) bytes at a time. *bzwrite()* > int bzwrite(resource bz, string data [, int length]) |bzwrite| writes the contents of the string {data} to the bzip2 file stream pointed to by {bz}. If the optional {length} argument is given, writing will stop after length (uncompressed) bytes have been written or the end of string is reached, whichever comes first. ============================================================================== Calendar *php-calendar* *cal_days_in_month()* > int cal_days_in_month(int calendar, int month, int year) This function will return the number of days in the {month} of {year} for the specified {calendar}. *cal_from_jd()* > array cal_from_jd(int jd, int calendar) |cal_from_jd| converts the Julian day given in {jd} into a date of the specified {calendar}. Supported {calendar} values are CAL_GREGORIAN, CAL_JULIAN, CAL_JEWISH and CAL_FRENCH. *cal_info()* > array cal_info( [int calendar]) |cal_info| returns information on the specified {calendar}. *cal_to_jd()* > int cal_to_jd(int calendar, int month, int day, int year) |cal_to_jd| calculates the Julian day count for a date in the specified {calendar}. Supported {calendar}s are CAL_GREGORIAN, CAL_JULIAN, CAL_JEWISH and CAL_FRENCH. *easter_date()* > int easter_date( [int year]) Returns the Unix timestamp corresponding to midnight on Easter of the given year. *easter_days()* > int easter_days( [int year [, int method]]) Returns the number of days after March 21 on which Easter falls for a given year. If no year is specified, the current year is assumed. *frenchtojd()* > int frenchtojd(int month, int day, int year) Converts a date from the French Republican Calendar to a Julian Day Count. *gregoriantojd()* > int gregoriantojd(int month, int day, int year) Valid Range for Gregorian Calendar 4714 B.C. to 9999 A.D. *jddayofweek()* > mixed jddayofweek(int julianday [, int mode]) Returns the day of the week. Can return a string or an integer depending on the mode. Calendar week modes Mode Meaning 0 (Default) Returns the day number as an int (0=Sunday, 1=Monday, etc) 1 Returns string containing the day of week (English-Gregorian) 2 Returns a string containing the abbreviated day of week (English-Gregorian) *jdmonthname()* > string jdmonthname(int julianday, int mode) Returns a string containing a month name. {mode} tells this function which calendar to convert the Julian Day Count to, and what type of month names are to be returned. Calendar modes Mode Meaning Values 0 Gregorian - abbreviated Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec 1 Gregorian January, February, March, April, May, June, July, August, September, October, November, December 2 Julian - abbreviated Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec 3 Julian January, February, March, April, May, June, July, August, September, October, November, December 4 Jewish Tishri, Heshvan, Kislev, Tevet, Shevat, AdarI, AdarII, Nisan, Iyyar, Sivan, Tammuz, Av, Elul 5 French Republican Vendemiaire, Brumaire, Frimaire, Nivose, Pluviose, Ventose, Germinal, Floreal, Prairial, Messidor, Thermidor, Fructidor, Extra *jdtofrench()* > string jdtofrench(int juliandaycount) Converts a Julian Day Count to the French Republican Calendar. *jdtogregorian()* > string jdtogregorian(int julianday) Converts Julian Day Count to a string containing the Gregorian date in the format of "month/day/year". *jdtojewish()* > string jdtojewish(int juliandaycount [, bool hebrew [, int fl]]) Converts a Julian Day Count to the Jewish Calendar. *jdtojulian()* > string jdtojulian(int julianday) Converts Julian Day Count to a string containing the Julian Calendar Date in the format of "month/day/year". *jdtounix()* > int jdtounix(int jday) This function will return a Unix timestamp corresponding to the Julian Day given in {jday} or FALSE if {jday} is not inside the Unix epoch (Gregorian years between 1970 and 2037 or 2440588 <= {jday} <= 2465342 ). The time returned is localtime (and not GMT). *jewishtojd()* > int jewishtojd(int month, int day, int year) Although this function can handle dates all the way back to the year 1 (3761 B.C.), such use may not be meaningful. The Jewish calendar has been in use for several thousand years, but in the early days there was no formula to determine the start of a month. A new month was started when the new moon was first observed. *juliantojd()* > int juliantojd(int month, int day, int year) Valid Range for Julian Calendar 4713 B.C. to 9999 A.D. *unixtojd()* > int unixtojd( [int timestamp]) Return the Julian Day for a Unix {timestamp} (seconds since 1.1.1970), or for the current day if no {timestamp} is given. ============================================================================== Ccvs *php-ccvs* *ccvs_add()* > string ccvs_add(string session, string invoice, string argtype, string argval) *ccvs_auth()* > string ccvs_auth(string session, string invoice) *ccvs_command()* > string ccvs_command(string session, string type, string argval) *ccvs_count()* > int ccvs_count(string session, string type) *ccvs_delete()* > string ccvs_delete(string session, string invoice) *ccvs_done()* > string ccvs_done(string sess) *ccvs_init()* > string ccvs_init(string name) *ccvs_lookup()* > string ccvs_lookup(string session, string invoice, int inum) *ccvs_new()* > string ccvs_new(string session, string invoice) *ccvs_report()* > string ccvs_report(string session, string type) *ccvs_return()* > string ccvs_return(string session, string invoice) *ccvs_reverse()* > string ccvs_reverse(string session, string invoice) *ccvs_sale()* > string ccvs_sale(string session, string invoice) *ccvs_status()* > string ccvs_status(string session, string invoice) *ccvs_textvalue()* > string ccvs_textvalue(string session) *ccvs_void()* > string ccvs_void(string session, string invoice) ============================================================================== Classkit *php-classkit* *classkit_import()* > array classkit_import(string filename) {filename} The filename of the class method definitions to import *classkit_method_add()* > bool classkit_method_add(string classname, string methodname, string args, string code [, int flags]) {classname} The class to which this method will be added *classkit_method_copy()* > bool classkit_method_copy(string dClass, string dMethod, string sClass [, string sMethod]) {dClass} Destination class for copied method *classkit_method_redefine()* > bool classkit_method_redefine(string classname, string methodname, string args, string code [, int flags]) {classname} The class in which to redefine the method *classkit_method_remove()* > bool classkit_method_remove(string classname, string methodname) {classname} The class in which to remove the method *classkit_method_rename()* > bool classkit_method_rename(string classname, string methodname, string newname) {classname} The class in which to rename the method ============================================================================== Classobj *php-classobj* *call_user_method_array()* > mixed call_user_method_array(string method_name, array paramarr) The |call_user_method_array| function is deprecated as of PHP 4.1.0, use the |call_user_func_array| variety with the array(&$obj, "method_name") syntax instead. *call_user_method()* > mixed call_user_method(string method_name [, mixed parameter]) The |call_user_method| function is deprecated as of PHP 4.1.0, use the |call_user_func| variety with the array(&$obj, "method_name") syntax instead. *class_exists()* > bool class_exists(string class_name [, bool autoload]) This function returns TRUE if the class given by {class_name} has been defined, FALSE otherwise. *get_class_methods()* > array get_class_methods(mixed class_name) This function returns an array of method names defined for the class specified by {class_name}. *get_class_vars()* > array get_class_vars(string class_name) This function will return an associative array of default properties of the class. The resulting array elements are in the form of varname => value. *get_class()* > string get_class(object obj) This function returns the name of the class of which the object {obj} is an instance. Returns FALSE if {obj} is not an object. *get_declared_classes()* > array get_declared_classes() This function returns an array of the names of the declared classes in the current script. *get_declared_interfaces()* > array get_declared_interfaces() This function returns an array of the names of the declared interfaces in the current script. *get_object_vars()* > array get_object_vars(object obj) This function returns an associative array of defined object properties for the specified object {obj}. *get_parent_class()* > string get_parent_class(mixed obj) If {obj} is an object, returns the name of the parent class of the class of which {obj} is an instance. *interface_exists()* > bool interface_exists(string interface_name [, bool autoload]) This function returns TRUE if the interface given by {interface_name} has been defined, FALSE otherwise. *is_a()* > bool is_a(object object, string class_name) This function returns TRUE if the object is of this class or has this class as one of its parents, FALSE otherwise. *is_subclass_of()* > bool is_subclass_of(mixed object, string class_name) This function returns TRUE if the object {object}, belongs to a class which is a subclass of {class_name}, FALSE otherwise. *method_exists()* > bool method_exists(object object, string method_name) This function returns TRUE if the method given by {method_name} has been defined for the given {object}, FALSE otherwise. ============================================================================== Com *php-com* *COM()* > com COM(string module_name [, mixed server_name [, int codepage [, string typelib]]]) The COM class allows you to instantiate an OLE compatible COM object and call its methods and access its properties. *DOTNET()* > string DOTNET(string class_name [, int codepage]) The DOTNET class allows you to instantiate a class from a .Net assembly and call its methods and access its properties. *VARIANT()* > object VARIANT( [mixed value [, int type [, int codepage]]]) The VARIANT is COM's equivalent of the PHP zval; it is a structure that can contain a value with a range of different possible types. The VARIANT class provided by the COM extension allows you to have more control over the way that PHP passes values to and from COM. *com_addref()* > void com_addref() Increases the components reference counter. *com_create_guid()* > string com_create_guid() Generates a Globally Unique Identifier (GUID) and returns it as a string. A GUID is generated in the same way as DCE UUID's, except that the Microsoft convention is to enclose a GUID in curly braces. *com_event_sink()* > bool com_event_sink(variant comobject, object sinkobject [, mixed sinkinterface]) Instructs COM to sink events generated by {comobject} into the PHP object {sinkobject}. PHP will attempt to use the default dispinterface type specified by the typelibrary associated with {comobject}, but you may override this choice by setting {sinkinterface} to the name of the dispinterface that you want to use. *com_get_active_object()* > variant com_get_active_object(string progid [, int code_page]) |com_get_active_object| is similar to creating a new instance of a object, except that it will only return an object to your script if the object is already running. OLE applications use something known as the Running Object Table to allow well-known applications to be launched only once; this function exposes the COM library function GetActiveObject() to get a handle on a running instance. *com_get()* > mixed com_get(resource com_object, string property) Returns the value of the {property} of the COM component referenced by {com_object}. Returns FALSE on error. *com_invoke()* > mixed com_invoke(resource com_object, string function_name [, mixed function_parameters]) |com_invoke| invokes the method named {function_name} of the COM component referenced by {com_object}. |com_invoke| returns FALSE on error, returns the {function_name}'s return value on success. All the extra parameters {function_parameters} are passed to the method {function_name}. *com_isenum()* > bool com_isenum(variant com_module) Checks to see if a COM object can be enumerated using the Next() method hack. Returns TRUE if it can, FALSE if it cannot. See class for more details on these methods. *com_load_typelib()* > bool com_load_typelib(string typelib_name [, bool case_insensitive]) Loads a type-library and registers its constants in the engine, as though they were defined using |define|. The {case_insensitive} behaves in the same way as the parameter with the same name in the |define| function. *com_load()* > resource com_load(string module_name [, string server_name [, int codepage]]) Equivalent to using the new operator to create an instance of the class. You should do that instead of calling this function. *com_message_pump()* > bool com_message_pump( [int timeoutms]) This function will sleep for up to {timeoutms} milliseconds, or until a message arrives in the queue. If a message or messages arrives before the timeout, they will be dispatched, and the function will return TRUE. If the timeout occurs and no messages were processed, the return value will be FALSE. If you do not specify a value for {timeoutms}, then 0 will be assumed. A 0 value means that no waiting will be performed; if there are messages pending they will be dispatched as before; if there are no messages pending, the function will return FALSE immediately without sleeping. *com_print_typeinfo()* > bool com_print_typeinfo(object comobject [, string dispinterface [, bool wantsink]]) The purpose of this function is to help generate a skeleton class for use as an event sink. You may also use it to generate a dump of any COM object, provided that it supports enough of the introspection interfaces, and that you know the name of the interface you want to display. *com_propget()* > void com_propget() This function is an alias for |com_get|. *com_propput()* > void com_propput() This function is an alias for |com_set|. *com_propset()* > void com_propset() This function is an alias for |com_set|. *com_release()* > void com_release() Decreases the components reference counter. *com_set()* > void com_set(resource com_object, string property, mixed value) Sets the value of the {property} of the COM component referenced by {com_object}. Returns the newly set value if succeeded, FALSE on error. *variant_abs()* > mixed variant_abs(mixed val) Returns the absolute value of {val}. *variant_add()* > mixed variant_add(mixed left, mixed right) Adds {left} to {right} using the following rules (taken from the MSDN library), which correspond to those of Visual Basic: Variant Addition Rules If Then Both expressions are of the string type Concatenation One expression is a string type and the other a character Addition One expression is numeric and the other is a string Addition Both expressions are numeric Addition Either expression is NULL NULL is returned Both expressions are empty Integer subtype is returned *variant_and()* > mixed variant_and(mixed left, mixed right) Performs a bitwise AND operation, according to the following truth table; note that this is slightly different from a regular AND operation. Variant AND Rules If {left} is If {right} is then the result is TRUETRUETRUE TRUEFALSEFALSE TRUENULLNULL FALSETRUEFALSE FALSEFALSEFALSE FALSENULLFALSE NULLTRUENULL NULLFALSEFALSE NULLNULLNULL *variant_cast()* > variant variant_cast(variant variant, int type) This function makes a copy of {variant} and then performs a variant cast operation to force the copy to have the type given by {type}. {type} should be one of the VT_XXX constants. *variant_cat()* > mixed variant_cat(mixed left, mixed right) Concatenates {left} with {right} and returns the result. *variant_cmp()* > int variant_cmp(mixed left, mixed right [, int lcid [, int flags]]) Compares {left} with {right} and returns one of the following values: Variant Comparision Results value meaning VARCMP_LT {left} is less than {right} VARCMP_EQ {left} is equal to {right} VARCMP_GT {left} is greater than {right} VARCMP_NULL Either {left}, {right} or both are NULL *variant_date_from_timestamp()* > variant variant_date_from_timestamp(int timestamp) Converts {timestamp} from a unix timestamp value into a variant of type VT_DATE. This allows easier interopability between the unix-ish parts of PHP and COM. *variant_date_to_timestamp()* > int variant_date_to_timestamp(variant variant) Converts {variant} from a VT_DATE (or similar) value into a unix timestamp. This allows easier interopability between the unix-ish parts of PHP and COM. *variant_div()* > mixed variant_div(mixed left, mixed right) Divides {left} by {right} and returns the result, subject to the following rules: Variant Division Rules If Then Both expressions are of the string, date, character, boolean type Double is returned One expression is a string type and the other a character Division and a double is returned One expression is numeric and the other is a string Division and a double is returned. Both expressions are numeric Division and a double is returned Either expression is NULL NULL is returned {right} is empty and {left} is anything but empty A com_exception with code DISP_E_DIVBYZERO is thrown {left} is empty and {right} is anything but empty. 0 as type double is returned Both expressions are empty A com_exception with code DISP_E_OVERFLOW is thrown *variant_eqv()* > mixed variant_eqv(mixed left, mixed right) If each bit in {left} is equal to the corresponding bit in {right} then TRUE is returned, otherwise FALSE is returned. *variant_fix()* > mixed variant_fix(mixed variant) If {variant} is negative, then the first negative integer greater than or equal to the variant is returned, otherwise returns the integer portion of the value of {variant}. *variant_get_type()* > int variant_get_type(variant variant) This function returns an integer value that indicates the type of {variant}, which can be an instance of , or classes. The return value can be compared to one of the VT_XXX constants. *variant_idiv()* > mixed variant_idiv(mixed left, mixed right) Converts {left} and {right} to integer values, and then performs integer division according the following rules: Variant Integer Division Rules If Then Both expressions are of the string, date, character, boolean type Division and integer is returned One expression is a string type and the other a character Division One expression is numeric and the other is a string Division Both expressions are numeric Division Either expression is NULL NULL is returned Both expressions are empty A com_exception with code DISP_E_DIVBYZERO is thrown *variant_imp()* > mixed variant_imp(mixed left, mixed right) Performs a bitwise implication operation, according to the following truth table: Variant Implication Table If {left} is If {right} is then the result is TRUETRUETRUE TRUEFALSETRUE TRUENULLTRUE FALSETRUETRUE FALSEFALSETRUE FALSENULLTRUE NULLTRUETRUE NULLFALSENULL NULLNULLNULL *variant_int()* > mixed variant_int(mixed variant) If {variant} is negative, then the first negative integer greater than or equal to the variant is returned, otherwise returns the integer portion of the value of {variant}. *variant_mod()* > mixed variant_mod(mixed left, mixed right) Divides {left} by {right} and returns the remainder. *variant_mul()* > mixed variant_mul(mixed left, mixed right) Multiplies {left} by {right} and returns the result, subject to the following rules: Variant Multiplication Rules If Then Both expressions are of the string, date, character, boolean type Multiplication One expression is a string type and the other a character Multiplication One expression is numeric and the other is a string Multiplication Both expressions are numeric Multiplication Either expression is NULL NULL is returned Both expressions are empty Empty string is returned *variant_neg()* > mixed variant_neg(mixed variant) Performs logical negation of {variant} and returns the result. *variant_not()* > mixed variant_not(mixed variant) Performs bitwise not negation on {variant} and returns the result. If {variant} is NULL, the result will also be NULL. *variant_or()* > mixed variant_or(mixed left, mixed right) Performs a bitwise OR operation, according to the following truth table; note that this is slightly different from a regular OR operation. Variant OR Rules If {left} is If {right} is then the result is TRUETRUETRUE TRUEFALSETRUE TRUENULLTRUE FALSETRUETRUE FALSEFALSEFALSE FALSENULLNULL NULLTRUETRUE NULLFALSENULL NULLNULLNULL *variant_pow()* > mixed variant_pow(mixed left, mixed right) Returns the result of {left} to the power of {right}. *variant_round()* > mixed variant_round(mixed variant, int decimals) Returns the value of {variant} rounded to {decimals} decimal places. *variant_set_type()* > void variant_set_type(variant variant, int type) This function is similar to |variant_cast| except that the variant is modified "in-place"; no new variant is created. The parameters for this function have identical meaning to those of |variant_cast|. *variant_set()* > void variant_set(variant variant, mixed value) Converts {value} to a variant and assigns it to the {variant} object; no new variant object is created, and the old value of {variant} is freed/released. *variant_sub()* > mixed variant_sub(mixed left, mixed right) Subtracts {right} from {left} using the following rules: Variant Subtraction Rules If Then Both expressions are of the string type Subtraction One expression is a string type and the other a character Subtraction One expression is numeric and the other is a string Subtraction. Both expressions are numeric Subtraction Either expression is NULL NULL is returned Both expressions are empty Empty string is returned *variant_xor()* > mixed variant_xor(mixed left, mixed right) Performs a logical exclusion, according to the following truth table: Variant XOR Rules If {left} is If {right} is then the result is TRUETRUEFALSE TRUEFALSETRUE FALSETRUETRUE FALSEFALSEFALSE NULLNULLNULL ============================================================================== Cpdf *php-cpdf* *cpdf_add_annotation()* > bool cpdf_add_annotation(int pdf_document, float llx, float lly, float urx, float ury, string title, string content [, int mode]) The |cpdf_add_annotation| adds a note with the lower left corner at ({llx}, {lly}) and the upper right corner at ({urx}, {ury}). Returns TRUE on success or FALSE on failure.; *cpdf_add_outline()* > int cpdf_add_outline(int pdf_document, int lastoutline, int sublevel, int open, int pagenr, string text) The |cpdf_add_outline| function adds a bookmark with text {text} that points to the current page. *cpdf_arc()* > bool cpdf_arc(int pdf_document, float radius, float start, float end [, int mode]) The |cpdf_arc| function draws an arc with center at point (x-coor, y-coor) and radius {radius}, starting at angle {start} and ending at angle {end}. Returns TRUE on success or FALSE on failure.; *cpdf_begin_text()* > bool cpdf_begin_text(int pdf_document) The |cpdf_begin_text| function starts a text section. Returns TRUE on success or FALSE on failure.; The created text section must be ended with |cpdf_end_text|. *cpdf_circle()* > bool cpdf_circle(int pdf_document, float radius [, int mode]) The |cpdf_circle| function draws a circle with center at point (x-coor, y-coor) and radius {radius}. Returns TRUE on success or FALSE on failure.; *cpdf_clip()* > bool cpdf_clip(int pdf_document) The |cpdf_clip| function clips all drawing to the current path. Returns TRUE on success or FALSE on failure.; *cpdf_close()* > bool cpdf_close(int pdf_document) The |cpdf_close| function closes the pdf document. Returns TRUE on success or FALSE on failure.; This should be the last function even after |cpdf_finalize|, |cpdf_output_buffer| and |cpdf_save_to_file|. *cpdf_closepath_fill_stroke()* > bool cpdf_closepath_fill_stroke(int pdf_document) The |cpdf_closepath_fill_stroke| function closes, fills the interior of the current path with the current fill color and draws current path. Returns TRUE on success or FALSE on failure.; *cpdf_closepath_stroke()* > bool cpdf_closepath_stroke(int pdf_document) The |cpdf_closepath_stroke| function is a combination of |cpdf_closepath| and |cpdf_stroke|. Then clears the path. Returns TRUE on success or FALSE on failure.; *cpdf_closepath()* > bool cpdf_closepath(int pdf_document) The |cpdf_closepath| function closes the current path. Returns TRUE on success or FALSE on failure.; *cpdf_continue_text()* > bool cpdf_continue_text(int pdf_document, string text) The |cpdf_continue_text| function outputs the string in {text} in the next line. Returns TRUE on success or FALSE on failure.; *cpdf_curveto()* > bool cpdf_curveto(int pdf_document, float x1, float y1, float x2, float y2, float x3, float y3 [, int mode]) The |cpdf_curveto| function draws a Bezier curve from the current point to the point ({x3}, {y3}) using ({x1}, {y1}) and ({x2}, {y2}) as control points. Returns TRUE on success or FALSE on failure.; *cpdf_end_text()* > bool cpdf_end_text(int pdf_document) The |cpdf_end_text| function ends a text section which was started with |cpdf_begin_text|. Returns TRUE on success or FALSE on failure.; *cpdf_fill_stroke()* > bool cpdf_fill_stroke(int pdf_document) The |cpdf_fill_stroke| function fills the interior of the current path with the current fill color and draws current path. Returns TRUE on success or FALSE on failure.; *cpdf_fill()* > bool cpdf_fill(int pdf_document) The |cpdf_fill| function fills the interior of the current path with the current fill color. Returns TRUE on success or FALSE on failure.; *cpdf_finalize_page()* > bool cpdf_finalize_page(int pdf_document, int page_number) The |cpdf_finalize_page| function ends the page with page number {page_number}. Returns TRUE on success or FALSE on failure.; *cpdf_finalize()* > bool cpdf_finalize(int pdf_document) The |cpdf_finalize| function ends the document. You still have to call |cpdf_close|. Returns TRUE on success or FALSE on failure.; *cpdf_global_set_document_limits()* > bool cpdf_global_set_document_limits(int maxpages, int maxfonts, int maximages, int maxannotations, int maxobjects) The |cpdf_global_set_document_limits| function sets several document limits. This function has to be called before |cpdf_open| to take effect. It sets the limits for any document open afterwards. Returns TRUE on success or FALSE on failure.; *cpdf_import_jpeg()* > int cpdf_import_jpeg(int pdf_document, string file_name, float angle, float width, float height, int gsave [, int mode]) The |cpdf_import_jpeg| function opens an image stored in the file with the name {file_name}. The format of the image has to be jpeg. The image is placed on the current page at position (x-coor, y-coor). The image is rotated by {angle} degrees. {gsave} should be non-zero to allow this function to operate correctly. *cpdf_lineto()* > bool cpdf_lineto(int pdf_document [, int mode]) The |cpdf_lineto| function draws a line from the current point to the point with coordinates (x-coor, y-coor). Returns TRUE on success or FALSE on failure.; *cpdf_moveto()* > bool cpdf_moveto(int pdf_document [, int mode]) The |cpdf_moveto| function set the current point to the coordinates x-coor and y-coor. Returns TRUE on success or FALSE on failure.; *cpdf_newpath()* > bool cpdf_newpath(int pdf_document) The |cpdf_newpath| starts a new path on the document given by the {pdf_document} parameter. Returns TRUE on success or FALSE on failure.; *cpdf_open()* > int cpdf_open(int compression [, string filename [, array doc_limits]]) The |cpdf_open| function opens a new pdf document. The first parameter turns document compression on if it is unequal to 0. The second optional parameter sets the file in which the document is written. If it is omitted the document is created in memory and can either be written into a file with the |cpdf_save_to_file| or written to standard output with |cpdf_output_buffer|. The return value will be needed in further versions of ClibPDF as the first parameter in all other functions which are writing to the pdf document. The ClibPDF library takes the filename "-" as a synonym for stdout. If PHP is compiled as an apache module this will not work because the way ClibPDF outputs to stdout does not work with apache. You can solve this problem by skipping the filename and using |cpdf_output_buffer| to output the pdf document. *cpdf_output_buffer()* > bool cpdf_output_buffer(int pdf_document) The |cpdf_output_buffer| function outputs the pdf document to stdout. The document has to be created in memory which is the case if |cpdf_open| has been called with no filename parameter. Returns TRUE on success or FALSE on failure.; *cpdf_page_init()* > bool cpdf_page_init(int pdf_document, int page_number, int orientation, float height, float width [, float unit]) The |cpdf_page_init| function starts a new page with height {height} and width {width}. Returns TRUE on success or FALSE on failure.; The page has number {page_number} and orientation {orientation}. {orientation} can be 0 for portrait and 1 for landscape. The last optional parameter {unit} sets the unit for the coordinate system. The value should be the number of postscript points per unit. Since one inch is equal to 72 points, a value of 72 would set the unit to one inch. The default is also 72. *cpdf_place_inline_image()* > bool cpdf_place_inline_image(int pdf_document, int image, float angle, float width, float height, int gsave [, int mode]) The |cpdf_place_inline_image| function places an image created with the PHP image functions on the page at position (x-coor, y-coor). The image can be scaled at the same time. Returns TRUE on success or FALSE on failure.; *cpdf_rect()* > bool cpdf_rect(int pdf_document, float width, float height [, int mode]) The |cpdf_rect| function draws a rectangle with its lower left corner at point (x-coor, y-coor). This width is set to {width}. This height is set to {height}. Returns TRUE on success or FALSE on failure.; *cpdf_restore()* > bool cpdf_restore(int pdf_document) The |cpdf_restore| function restores the environment saved with |cpdf_save|. It works like the postscript command grestore. Very useful if you want to translate or rotate an object without effecting other objects. Returns TRUE on success or FALSE on failure.; *cpdf_rlineto()* > bool cpdf_rlineto(int pdf_document [, int mode]) The |cpdf_rlineto| function draws a line from the current point to the relative point with coordinates (x-coor, y-coor). Returns TRUE on success or FALSE on failure.; *cpdf_rmoveto()* > bool cpdf_rmoveto(int pdf_document [, int mode]) The |cpdf_rmoveto| function set the current point relative to the coordinates x-coor and y-coor. Returns TRUE on success or FALSE on failure.; *cpdf_rotate_text()* > bool cpdf_rotate_text(int pdfdoc, float angle) *cpdf_rotate()* > bool cpdf_rotate(int pdf_document, float angle) The |cpdf_rotate| function set the rotation in degrees to {angle}. Returns TRUE on success or FALSE on failure.; *cpdf_save_to_file()* > bool cpdf_save_to_file(int pdf_document, string filename) The |cpdf_save_to_file| function outputs the pdf document into a file if it has been created in memory. Returns TRUE on success or FALSE on failure.; *cpdf_save()* > bool cpdf_save(int pdf_document) The |cpdf_save| function saves the current environment. It works like the postscript command gsave. Very useful if you want to translate or rotate an object without effecting other objects. Returns TRUE on success or FALSE on failure.; *cpdf_scale()* > bool cpdf_scale(int pdf_document) The |cpdf_scale| function set the scaling factor in both directions. Returns TRUE on success or FALSE on failure.; *cpdf_set_action_url()* > bool cpdf_set_action_url(int pdfdoc, float xll, float yll, float xur, float xur, string url [, int mode]) *cpdf_set_char_spacing()* > bool cpdf_set_char_spacing(int pdf_document, float space) The |cpdf_set_char_spacing| function sets the spacing between characters. Returns TRUE on success or FALSE on failure.; *cpdf_set_creator()* > bool cpdf_set_creator(int pdf_document, string creator) The |cpdf_set_creator| function sets the creator of a pdf document. Returns TRUE on success or FALSE on failure.; *cpdf_set_current_page()* > bool cpdf_set_current_page(int pdf_document, int page_number) The |cpdf_set_current_page| function set the page on which all operations are performed. One can switch between pages until a page is finished with |cpdf_finalize_page|. Returns TRUE on success or FALSE on failure.; *cpdf_set_font_directories()* > bool cpdf_set_font_directories(int pdfdoc, string pfmdir, string pfbdir) *cpdf_set_font_map_file()* > bool cpdf_set_font_map_file(int pdfdoc, string filename) *cpdf_set_font()* > bool cpdf_set_font(int pdf_document, string font_name, float size, string encoding) The |cpdf_set_font| function sets the current font face, font size and encoding. Currently only the standard postscript fonts are supported. Returns TRUE on success or FALSE on failure.; *cpdf_set_horiz_scaling()* > bool cpdf_set_horiz_scaling(int pdf_document, float scale) The |cpdf_set_horiz_scaling| function sets the horizontal scaling to {scale} percent. Returns TRUE on success or FALSE on failure.; *cpdf_set_keywords()* > bool cpdf_set_keywords(int pdf_document, string keywords) The |cpdf_set_keywords| function sets the keywords of a pdf document. Returns TRUE on success or FALSE on failure.; *cpdf_set_leading()* > bool cpdf_set_leading(int pdf_document, float distance) The |cpdf_set_leading| function sets the {distance} between text lines. This will be used if text is output by |cpdf_continue_text|. Returns TRUE on success or FALSE on failure.; *cpdf_set_page_animation()* > bool cpdf_set_page_animation(int pdf_document, int transition, float duration, float direction, int orientation, int inout) The |cpdf_set_page_animation| function set the transition between following pages. Returns TRUE on success or FALSE on failure.; *cpdf_set_subject()* > bool cpdf_set_subject(int pdf_document, string subject) The |cpdf_set_subject| function sets the {subject} of a pdf document. Returns TRUE on success or FALSE on failure.; *cpdf_set_text_matrix()* > bool cpdf_set_text_matrix(int pdf_document, array matrix) The |cpdf_set_text_matrix| function sets a {matrix} which describes a transformation applied on the current text font. Returns TRUE on success or FALSE on failure.; *cpdf_set_text_pos()* > bool cpdf_set_text_pos(int pdf_document [, int mode]) The |cpdf_set_text_pos| function sets the position of text for the next |cpdf_show| function call. Returns TRUE on success or FALSE on failure.; *cpdf_set_text_rendering()* > bool cpdf_set_text_rendering(int pdf_document, int rendermode) The |cpdf_set_text_rendering| function determines how text is rendered. Returns TRUE on success or FALSE on failure.; *cpdf_set_text_rise()* > bool cpdf_set_text_rise(int pdf_document, float value) The |cpdf_set_text_rise| function sets the text rising to {value} units. Returns TRUE on success or FALSE on failure.; *cpdf_set_title()* > bool cpdf_set_title(int pdf_document, string title) The |cpdf_set_title| function sets the {title} of a pdf document. Returns TRUE on success or FALSE on failure.; *cpdf_set_viewer_preferences()* > bool cpdf_set_viewer_preferences(int pdfdoc, array preferences) *cpdf_set_word_spacing()* > bool cpdf_set_word_spacing(int pdf_document, float space) The |cpdf_set_word_spacing| function sets the spacing between words. Returns TRUE on success or FALSE on failure.; *cpdf_setdash()* > bool cpdf_setdash(int pdf_document, float white, float black) The |cpdf_setdash| function set the dash pattern {white} white units and {black} black units. If both are 0 a solid line is set. Returns TRUE on success or FALSE on failure.; *cpdf_setflat()* > bool cpdf_setflat(int pdf_document, float value) The |cpdf_setflat| function set the flatness to a value between 0 and 100. Returns TRUE on success or FALSE on failure.; *cpdf_setgray_fill()* > bool cpdf_setgray_fill(int pdf_document, float value) The |cpdf_setgray_fill| function sets the current gray {value} to fill a path. Returns TRUE on success or FALSE on failure.; *cpdf_setgray_stroke()* > bool cpdf_setgray_stroke(int pdf_document, float gray_value) The |cpdf_setgray_stroke| function sets the current drawing color to the given gray value. Returns TRUE on success or FALSE on failure.; *cpdf_setgray()* > bool cpdf_setgray(int pdf_document, float gray_value) The |cpdf_setgray| function sets the current drawing and filling color to the given gray value. Returns TRUE on success or FALSE on failure.; *cpdf_setlinecap()* > bool cpdf_setlinecap(int pdf_document, int value) The |cpdf_setlinecap| function set the linecap parameter between a {value} of 0 and 2. 0 = butt end, 1 = round, 2 = projecting square. Returns TRUE on success or FALSE on failure.; *cpdf_setlinejoin()* > bool cpdf_setlinejoin(int pdf_document, int value) The |cpdf_setlinejoin| function set the linejoin parameter between a {value} of 0 and 2. 0 = miter, 1 = round, 2 = bevel. Returns TRUE on success or FALSE on failure.; *cpdf_setlinewidth()* > bool cpdf_setlinewidth(int pdf_document, float width) The |cpdf_setlinewidth| function set the line width to {width}. Returns TRUE on success or FALSE on failure.; *cpdf_setmiterlimit()* > bool cpdf_setmiterlimit(int pdf_document, float value) The |cpdf_setmiterlimit| function set the miter limit to a value greater or equal than 1. Returns TRUE on success or FALSE on failure.; *cpdf_setrgbcolor_fill()* > bool cpdf_setrgbcolor_fill(int pdf_document, float red_value, float green_value, float blue_value) The |cpdf_setrgbcolor_fill| function sets the current rgb color value to fill a path. Returns TRUE on success or FALSE on failure.; *cpdf_setrgbcolor_stroke()* > bool cpdf_setrgbcolor_stroke(int pdf_document, float red_value, float green_value, float blue_value) The |cpdf_setrgbcolor_stroke| function sets the current drawing color to the given rgb color value. Returns TRUE on success or FALSE on failure.; *cpdf_setrgbcolor()* > bool cpdf_setrgbcolor(int pdf_document, float red_value, float green_value, float blue_value) The |cpdf_setrgbcolor| function sets the current drawing and filling color to the given rgb color value. Returns TRUE on success or FALSE on failure.; *cpdf_show_xy()* > bool cpdf_show_xy(int pdf_document, string text [, int mode]) The |cpdf_show_xy| function outputs the string {text} at position with coordinates (x-coor, y-coor). Returns TRUE on success or FALSE on failure.; *cpdf_show()* > bool cpdf_show(int pdf_document, string text) The |cpdf_show| function outputs the string in {text} at the current position. Returns TRUE on success or FALSE on failure.; *cpdf_stringwidth()* > float cpdf_stringwidth(int pdf_document, string text) The |cpdf_stringwidth| function returns the width of the string in {text}. It requires a font to be set before. *cpdf_stroke()* > bool cpdf_stroke(int pdf_document) The |cpdf_stroke| function draws a line along current path. Returns TRUE on success or FALSE on failure.; *cpdf_text()* > bool cpdf_text(int pdf_document, string text [, int mode [, float orientation [, int alignmode]]]) The |cpdf_text| function outputs the string {text} at position with coordinates (x-coor, y-coor). Returns TRUE on success or FALSE on failure.; *cpdf_translate()* > bool cpdf_translate(int pdf_document) The |cpdf_translate| function set the origin of coordinate system to the point (x-coor, y-coor). Returns TRUE on success or FALSE on failure.; ============================================================================== Crack *php-crack* *crack_check()* > bool crack_check(resource dictionary, string password) Returns TRUE if {password} is strong, or FALSE otherwise. *crack_closedict()* > bool crack_closedict( [resource dictionary]) Returns TRUE on success or FALSE on failure.; *crack_getlastmessage()* > string crack_getlastmessage() |crack_getlastmessage| returns the message from the last obscure check. *crack_opendict()* > resource crack_opendict(string dictionary) Returns a dictionary resource identifier on success, or FALSE on failure. ============================================================================== Ctype *php-ctype* *ctype_alnum()* > bool ctype_alnum(string text) Returns TRUE if every character in {text} is either a letter or a digit, FALSE otherwise. In the standard C locale letters are just [A-Za-z] and the function is equivalent to preg_match('/^[a-z0-9]*$/i', $text). *ctype_alpha()* > bool ctype_alpha(string text) Returns TRUE if every character in {text} is a letter from the current locale, FALSE otherwise. In the standard C locale letters are just [A-Za-z] and |ctype_alpha| is equivalent to (ctype_upper($text) || ctype_lower($text)) if $text is just a single character, but other languages have letters that are considered neither upper nor lower case. *ctype_cntrl()* > bool ctype_cntrl(string text) Returns TRUE if every character in {text} has a special control function, FALSE otherwise. Control characters are e.g. line feed, tab, esc. *ctype_digit()* > bool ctype_digit(string text) Returns TRUE if every character in {text} is a decimal digit, FALSE otherwise. *ctype_graph()* > bool ctype_graph(string text) Returns TRUE if every character in {text} is printable and actually creates visible output (no white space), FALSE otherwise. *ctype_lower()* > bool ctype_lower(string text) Returns TRUE if every character in {text} is a lowercase letter in the current locale. *ctype_print()* > bool ctype_print(string text) Returns TRUE if every character in {text} will actually create output (including blanks). Returns FALSE if {text} contains control characters or characters that do not have any output or control function at all. *ctype_punct()* > bool ctype_punct(string text) Returns TRUE if every character in {text} is printable, but neither letter, digit or blank, FALSE otherwise. *ctype_space()* > bool ctype_space(string text) Returns TRUE if every character in {text} creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters. *ctype_upper()* > bool ctype_upper(string text) Returns TRUE if every character in {text} is an uppercase letter in the current locale. *ctype_xdigit()* > bool ctype_xdigit(string text) Returns TRUE if every character in {text} is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise. ============================================================================== Curl *php-curl* *curl_close()* > void curl_close(resource ch) This function closes a CURL session and frees all resources. The CURL handle, {ch}, is also deleted. *curl_copy_handle()* > resource curl_copy_handle(resource ch) *curl_errno()* > int curl_errno(resource ch) Returns the error number for the last cURL operation on the resource {ch}, or 0 (zero) if no error occurred. *curl_error()* > string curl_error(resource ch) Returns a clear text error message for the last cURL operation on the resource {ch}, or '' (the empty string) if no error occurred. *curl_exec()* > mixed curl_exec(resource ch) This function should be called after you initialize a CURL session and all the options for the session are set. Its purpose is simply to execute the predefined CURL session (given by the {ch}). Initializing a new CURL session and fetching a webpage ]]> *curl_getinfo()* > string curl_getinfo(resource ch [, int opt]) Returns information about the last transfer, {opt} may be one of the following: "CURLINFO_EFFECTIVE_URL" - Last effective URL "CURLINFO_HTTP_CODE" - Last received HTTP code "CURLINFO_FILETIME" - Remote time of the retrieved document, if -1 is returned the time of the document is unknown "CURLINFO_TOTAL_TIME" - Total transaction time in seconds for last transfer "CURLINFO_NAMELOOKUP_TIME" - Time in seconds until name resolving was complete "CURLINFO_CONNECT_TIME" - Time in seconds it took to establish the connection "CURLINFO_PRETRANSFER_TIME" - Time in seconds from start until just before file transfer begins "CURLINFO_STARTTRANSFER_TIME" - Time in seconds until the first byte is about to be transferred "CURLINFO_REDIRECT_TIME" - Time in seconds of all redirection steps before final transaction was started "CURLINFO_SIZE_UPLOAD" - Total number of bytes uploaded "CURLINFO_SIZE_DOWNLOAD" - Total number of bytes downloaded "CURLINFO_SPEED_DOWNLOAD" - Average download speed "CURLINFO_SPEED_UPLOAD" - Average upload speed "CURLINFO_HEADER_SIZE" - Total size of all headers received "CURLINFO_REQUEST_SIZE" - Total size of issued requests, currently only for HTTP requests "CURLINFO_SSL_VERIFYRESULT" - Result of SSL certification verification requested by setting CURLOPT_SSL_VERIFYPEER "CURLINFO_CONTENT_LENGTH_DOWNLOAD" - content-length of download, read from Content-Length: field "CURLINFO_CONTENT_LENGTH_UPLOAD" - Specified size of upload "CURLINFO_CONTENT_TYPE" - Content-type of downloaded object, NULL indicates server did not send valid Content-Type: header *curl_init()* > resource curl_init( [string url]) The |curl_init| will initialize a new session and return a CURL handle for use with the |curl_setopt|, |curl_exec|, and |curl_close| functions. If the optional {url} parameter is supplied then the CURLOPT_URL option will be set to the value of the parameter. You can manually set this using the |curl_setopt| function. Initializing a new CURL session and fetching a webpage ]]> *curl_multi_add_handle()* > int curl_multi_add_handle(resource mh, resource ch) See also |curl_multi_init|, |curl_init|, and |curl_multi_remove_handle|. *curl_multi_close()* > void curl_multi_close(resource mh) See also |curl_multi_init| and |curl_close|. *curl_multi_exec()* > int curl_multi_exec(resource mh) See also |curl_multi_init| and |curl_exec|. *curl_multi_getcontent()* > string curl_multi_getcontent(resource ch) See also |curl_multi_init|. *curl_multi_info_read()* > array curl_multi_info_read(resource mh) See also |curl_multi_init|. *curl_multi_init()* > resource curl_multi_init() See also |curl_init| and |curl_multi_close|. *curl_multi_remove_handle()* > int curl_multi_remove_handle(resource mh, resource ch) See also |curl_multi_init|, |curl_init|, and |curl_multi_add_handle|. *curl_multi_select()* > int curl_multi_select(resource mh [, float timeout]) See also |curl_multi_init|. *curl_setopt()* > bool curl_setopt(resource ch, int option, mixed value) Set an option for a CURL session identified by the {ch} parameter. {option} specifies which option to set, and {value} specifies the value for the option given. *curl_version()* > string curl_version( [int version]) The |curl_version| function returns a string containing the current CURL version. ============================================================================== Cybercash *php-cybercash* *cybercash_base64_decode()* > string cybercash_base64_decode(string inbuff) *cybercash_base64_encode()* > string cybercash_base64_encode(string inbuff) *cybercash_decr()* > array cybercash_decr(string wmk, string sk, string inbuff) The function returns an associative array with the elements "errcode" and, if "errcode" is FALSE, "outbuff" (string), "outLth" (long) and "macbuff" (string). *cybercash_encr()* > array cybercash_encr(string wmk, string sk, string inbuff) The function returns an associative array with the elements "errcode" and, if "errcode" is FALSE, "outbuff" (string), "outLth" (long) and "macbuff" (string). ============================================================================== Cybermut *php-cybermut* ============================================================================== Cyrus *php-cyrus* *cyrus_authenticate()* > bool cyrus_authenticate(resource connection [, string mechlist [, string service [, string user [, int minssf [, int maxssf [, string authname [, string password]]]]]]]) *cyrus_bind()* > bool cyrus_bind(resource connection, array callbacks) *cyrus_close()* > bool cyrus_close(resource connection) *cyrus_connect()* > resource cyrus_connect( [string host [, string port [, int flags]]]) *cyrus_query()* > bool cyrus_query(resource connection, string query) *cyrus_unbind()* > bool cyrus_unbind(resource connection, string trigger_name) ============================================================================== Datetime *php-datetime* *checkdate()* > bool checkdate(int month, int day, int year) Returns TRUE if the date given is valid; otherwise returns FALSE. Checks the validity of the date formed by the arguments. A date is considered valid if: year is between 1 and 32767 inclusive month is between 1 and 12 inclusive {Day} is within the allowed number of days for the given {month}. Leap {year}s are taken into consideration. *date_sunrise()* > mixed date_sunrise(int timestamp [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]]) |date_sunrise| returns the sunrise time for a given day (specified as a {timestamp}) and location. The {latitude}, {longitude} and {zenith} parameters default to the date.default_latitude, date.default_longitude and date.sunrise_zenith configuration options, respectively. *date_sunset()* > mixed date_sunset(int timestamp [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]]) |date_sunset| returns the sunset time for a given day (specified as a {timestamp}) and location. The {latitude}, {longitude} and {zenith} parameters default to the date.default_latitude, date.default_longitude and date.sunset_zenith configuration options, respectively. *date()* > string date(string format [, int timestamp]) Returns a string formatted according to the given format string using the given integer {timestamp} or the current local time if no timestamp is given. In otherwords, {timestamp} is optional and defaults to the value of |time|. The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer). On Windows this range is limited from 01-01-1970 to 19-01-2038. *getdate()* > array getdate( [int timestamp]) Returns an associative array containing the date information of the {timestamp}, or the current local time if no {timestamp} is given, as the following associative array elements: *gettimeofday()* > mixed gettimeofday( [bool return_float]) This is an interface to gettimeofday(2). It returns an associative array containing the data returned from the system call. *gmdate()* > string gmdate(string format [, int timestamp]) Identical to the |date| function except that the time returned is Greenwich Mean Time (GMT). For example, when run in Finland (GMT +0200), the first line below prints "Jan 01 1998 00:00:00", while the second prints "Dec 31 1997 22:00:00". |gmdate| example ]]> *gmmktime()* > int gmmktime( [int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]]) Identical to |mktime| except the passed parameters represents a GMT date. *gmstrftime()* > string gmstrftime(string format [, int timestamp]) Behaves the same as |strftime| except that the time returned is Greenwich Mean Time (GMT). For example, when run in Eastern Standard Time (GMT -0500), the first line below prints "Dec 31 1998 20:00:00", while the second prints "Jan 01 1999 01:00:00". |gmstrftime| example ]]> *idate()* > int idate(string format [, int timestamp]) Returns a string formatted according to the given format string using the given integer {timestamp} or the current local time if no timestamp is given. In other words, {timestamp} is optional and defaults to the value of |time|. *localtime()* > array localtime( [int timestamp [, bool is_associative]]) The |localtime| function returns an array identical to that of the structure returned by the C function call. The first argument to |localtime| is the timestamp, if this is not given the current time as returned from |time| is used. The second argument to the |localtime| is the {is_associative}, if this is set to 0 or not supplied than the array is returned as a regular, numerically indexed array. If the argument is set to 1 then |localtime| is an associative array containing all the different elements of the structure returned by the C function call to localtime. The names of the different keys of the associative array are as follows: "tm_sec" - seconds "tm_min" - minutes "tm_hour" - hour "tm_mday" - day of the month "tm_mon" - month of the year, starting with 0 for January "tm_year" - Years since 1900 "tm_wday" - Day of the week "tm_yday" - Day of the year "tm_isdst" - Is daylight savings time in effect *microtime()* > mixed microtime( [bool get_as_float]) |microtime| returns the current Unix timestamp with microseconds. This function is only available on operating systems that support the gettimeofday() system call. *mktime()* > int mktime( [int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]]) Warning: Note the strange order of arguments, which differs from the order of arguments in a regular Unix mktime() call and which does not lend itself well to leaving out parameters from right to left (see below). It is a common error to mix these values up in a script. *strftime()* > string strftime(string format [, int timestamp]) Returns a string formatted according to the given format string using the given {timestamp} or the current local time if no timestamp is given. Month and weekday names and other language dependent strings respect the current locale set with |setlocale|. *strptime()* > array strptime(string timestamp, string format) |strptime| returns an array with the {timestamp} parsed, or FALSE on error. *strtotime()* > int strtotime(string time [, int now]) The function expects to be given a string containing an English date format and will try to parse that format into a Unix timestamp relative to the timestamp given in {now}, or the current time if none is supplied. Upon failure, -1 is returned. *time()* > int time() Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT). ============================================================================== Dba *php-dba* *dba_close()* > void dba_close(resource handle) |dba_close| closes the established database and frees all resources specified by {handle}. *dba_delete()* > bool dba_delete(string key, resource handle) |dba_delete| deletes the entry specified by {key} from the database specified with {handle}. *dba_exists()* > bool dba_exists(string key, resource handle) |dba_exists| checks whether the specified {key} exists in the database specified by {handle}. *dba_fetch()* > string dba_fetch(string key, resource handle) |dba_fetch| fetches the data specified by {key} from the database specified with {handle}. *dba_firstkey()* > string dba_firstkey(resource handle) |dba_firstkey| returns the first key of the database specified by {handle} and resets the internal key pointer. This permits a linear search through the whole database. *dba_handlers()* > array dba_handlers( [bool full_info]) |dba_handlers| returns an array with all handlers supported by this extension. *dba_insert()* > bool dba_insert(string key, string value, resource handle) |dba_insert| inserts the entry described with {key} and {value} into the database specified by {handle}. It fails, if an entry with the same {key} already exists. *dba_key_split()* > mixed dba_key_split(mixed key) |dba_key_split| returns an array of the form array(0=>group,1=>value_name). This function will return FALSE if {key} is NULL or FALSE. *dba_list()* > array dba_list() |dba_list| returns an associative array with all open database files. This array is in the form: resourceid=>filename. *dba_nextkey()* > string dba_nextkey(resource handle) |dba_nextkey| returns the next key of the database specified by {handle} and advances the internal key pointer. *dba_open()* > resource dba_open(string path, string mode, string handler) |dba_open| establishes a database instance for {path} with {mode} using {handler}. *dba_optimize()* > bool dba_optimize(resource handle) |dba_optimize| optimizes the underlying database specified by {handle}. *dba_popen()* > resource dba_popen(string path, string mode, string handler) |dba_popen| establishes a persistent database instance for {path} with {mode} using {handler}. *dba_replace()* > bool dba_replace(string key, string value, resource handle) |dba_replace| replaces or inserts the entry described with {key} and {value} into the database specified by {handle}. *dba_sync()* > bool dba_sync(resource handle) |dba_sync| synchronizes the database specified by {handle}. This will probably trigger a physical write to disk, if supported. ============================================================================== Dbase *php-dbase* *dbase_add_record()* > bool dbase_add_record(int dbase_identifier, array record) Adds the data in the {record} to the database. If the number of items in the supplied record isn't equal to the number of fields in the database, the operation will fail and FALSE will be returned. *dbase_close()* > bool dbase_close(int dbase_identifier) Closes the database associated with {dbase_identifier}. *dbase_create()* > int dbase_create(string filename, array fields) |dbase_create| creates a dBase database in the file {filename}, with the fields {fields}. *dbase_delete_record()* > bool dbase_delete_record(int dbase_identifier, int record) Marks {record} to be deleted from the database. To actually remove the record from the database, you must also call |dbase_pack|. *dbase_get_header_info()* > array dbase_get_header_info(int dbase_identifier) Returns information on the column structure of the database referenced by {dbase_identifier}. For each column in the database, there is an entry in a numerically-indexed array. The array index starts at 0. Each array element contains an associative array of column information. If the database header information cannot be read, FALSE is returned. *dbase_get_record_with_names()* > array dbase_get_record_with_names(int dbase_identifier, int record) Returns the data from {record} in an associative array. The array also includes an associative member named 'deleted' which is set to 1 if the record has been marked for deletion (see |dbase_delete_record|). *dbase_get_record()* > array dbase_get_record(int dbase_identifier, int record) Returns the data from {record} in an array. The array is indexed starting at 0, and includes an associative member named 'deleted' which is set to 1 if the record has been marked for deletion (see |dbase_delete_record|. *dbase_numfields()* > int dbase_numfields(int dbase_identifier) Returns the number of fields (columns) in the specified database. Field numbers are between 0 and dbase_numfields($db)-1, while record numbers are between 1 and dbase_numrecords($db). Using |dbase_numfields| \n"; } ?> ]]> *dbase_numrecords()* > int dbase_numrecords(int dbase_identifier) Returns the number of records (rows) in the specified database. Record numbers are between 1 and dbase_numrecords($db), while field numbers are between 0 and dbase_numfields($db)-1. *dbase_open()* > int dbase_open(string filename, int flags) Returns a dbase_identifier for the opened database, or FALSE if the database couldn't be opened. *dbase_pack()* > bool dbase_pack(int dbase_identifier) Packs the specified database (permanently deleting all records marked for deletion using |dbase_delete_record|). *dbase_replace_record()* > bool dbase_replace_record(int dbase_identifier, array record, int dbase_record_number) Replaces the data associated with the record {record_number} with the data in the {record} in the database. If the number of items in the supplied record is not equal to the number of fields in the database, the operation will fail and FALSE will be returned. ============================================================================== Dbm *php-dbm* *dblist()* > string dblist() Getting the information on the command line *dbmclose()* > bool dbmclose(resource dbm_identifier) Unlocks and closes the specified database. *dbmdelete()* > bool dbmdelete(resource dbm_identifier, string key) Deletes the value for {key} in the database. *dbmexists()* > bool dbmexists(resource dbm_identifier, string key) Returns TRUE if there is a value associated with the {key}. *dbmfetch()* > string dbmfetch(resource dbm_identifier, string key) Returns the value associated with {key}. *dbmfirstkey()* > string dbmfirstkey(resource dbm_identifier) Returns the first key in the database. Note that no particular order is guaranteed since the database may be built using a hash-table, which doesn't guarantee any ordering. *dbminsert()* > int dbminsert(resource dbm_identifier, string key, string value) Adds the value to the database with the specified key. *dbmnextkey()* > string dbmnextkey(resource dbm_identifier, string key) Returns the next key after {key}. By calling |dbmfirstkey| followed by successive calls to |dbmnextkey| it is possible to visit every key/value pair in the dbm database. For example: Visiting every key/value pair in a DBM database ]]> *dbmopen()* > resource dbmopen(string filename, string flags) The first argument is the full-path filename of the DBM file to be opened and the second is the file open mode which is one of "r", "n", "c" or "w" for read-only, new (implies read-write, and most likely will truncate an already-existing database of the same name), create (implies read-write, and will not truncate an already-existing database of the same name) and read-write respectively. *dbmreplace()* > int dbmreplace(resource dbm_identifier, string key, string value) Replaces the value for the specified key in the database. ============================================================================== Dbplus *php-dbplus* *dbplus_add()* > int dbplus_add(resource relation, array tuple) This function will add a tuple to a relation. The {tuple} data is an array of attribute/value pairs to be inserted into the given {relation}. After successful execution the {tuple} array will contain the complete data of the newly created tuple, including all implicitly set domain fields like sequences. *dbplus_aql()* > resource dbplus_aql(string query [, string server [, string dbpath]]) |dbplus_aql| will execute an AQL {query} on the given {server} and {dbpath}. *dbplus_chdir()* > string dbplus_chdir( [string newdir]) |dbplus_chdir| will change the virtual current directory where relation files will be looked for by |dbplus_open|. |dbplus_chdir| will return the absolute path of the current directory. Calling |dbplus_chdir| without giving any {newdir} may be used to query the current working directory. *dbplus_close()* > int dbplus_close(resource relation) Calling |dbplus_close| will close a relation previously opened by |dbplus_open|. *dbplus_curr()* > int dbplus_curr(resource relation) |dbplus_curr| will read the data for the current tuple for the given {relation} and will pass it back as an associative array in {tuple}. *dbplus_errcode()* > string dbplus_errcode( [int errno]) |dbplus_errcode| returns a cleartext error string for the error code passed as {errno} of for the result code of the last db++ operation if no parameter is given. *dbplus_errno()* > int dbplus_errno() |dbplus_errno| will return the error code returned by the last db++ operation. *dbplus_find()* > int dbplus_find(resource relation, array constraints, mixed tuple) |dbplus_find| will place a constraint on the given relation. Further calls to functions like |dbplus_curr| or |dbplus_next| will only return tuples matching the given constraints. *dbplus_first()* > int dbplus_first(resource relation) |dbplus_curr| will read the data for the first tuple for the given {relation}, make it the current tuple and pass it back as an associative array in {tuple}. *dbplus_flush()* > int dbplus_flush(resource relation) |dbplus_flush| will write all changes applied to {relation} since the last flush to disk. *dbplus_freealllocks()* > int dbplus_freealllocks() |dbplus_freealllocks| will free all tuple locks held by this client. *dbplus_freelock()* > int dbplus_freelock(resource relation, string tname) |dbplus_freelock| will release a write lock on the given {tuple} previously obtained by |dbplus_getlock|. *dbplus_freerlocks()* > int dbplus_freerlocks(resource relation) |dbplus_freerlocks| will free all tuple locks held on the given {relation}. *dbplus_getlock()* > int dbplus_getlock(resource relation, string tname) |dbplus_getlock| will request a write lock on the specified {tuple}. It will return zero on success or a non-zero error code, especially DBPLUS_ERR_WLOCKED, on failure. *dbplus_getunique()* > int dbplus_getunique(resource relation, int uniqueid) |dbplus_getunique| will obtain a number guaranteed to be unique for the given {relation} and will pass it back in the variable given as {uniqueid}. *dbplus_info()* > int dbplus_info(resource relation, string key) *dbplus_last()* > int dbplus_last(resource relation) |dbplus_curr| will read the data for the last tuple for the given {relation}, make it the current tuple and pass it back as an associative array in {tuple}. *dbplus_lockrel()* > int dbplus_lockrel(resource relation) |dbplus_lockrel| will request a write lock on the given relation. Other clients may still query the relation, but can't alter it while it is locked. *dbplus_next()* > int dbplus_next(resource relation) |dbplus_curr| will read the data for the next tuple for the given {relation}, will make it the current tuple and will pass it back as an associative array in {tuple}. *dbplus_open()* > resource dbplus_open(string name) The relation file {name} will be opened. {name} can be either a file name or a relative or absolute path name. This will be mapped in any case to an absolute relation file path on a specific host machine and server. *dbplus_prev()* > int dbplus_prev(resource relation) |dbplus_curr| will read the data for the previous tuple for the given {relation}, will make it the current tuple and will pass it back as an associative array in {tuple}. *dbplus_rchperm()* > int dbplus_rchperm(resource relation, int mask, string user, string group) |dbplus_rchperm| will change access permissions as specified by {mask}, {user} and {group}. The values for these are operating system specific. *dbplus_rcreate()* > resource dbplus_rcreate(string name, mixed domlist [, bool overwrite]) |dbplus_rcreate| will create a new relation named {name}. An existing relation by the same name will only be overwritten if the relation is currently not in use and {overwrite} is set to TRUE. *dbplus_rcrtexact()* > resource dbplus_rcrtexact(string name, resource relation [, bool overwrite]) |dbplus_rcrtexact| will create an exact but empty copy of the given {relation} under a new {name}. An existing relation by the same {name} will only be overwritten if {overwrite} is TRUE and no other process is currently using the relation. *dbplus_rcrtlike()* > resource dbplus_rcrtlike(string name, resource relation [, int overwrite]) |dbplus_rcrtexact| will create an empty copy of the given {relation} under a new {name}, but with default indices. An existing relation by the same {name} will only be overwritten if {overwrite} is TRUE and no other process is currently using the relation. *dbplus_resolve()* > int dbplus_resolve(string relation_name) |dbplus_resolve| will try to resolve the given {relation_name} and find out internal server id, real hostname and the database path on this host. The function will return an array containing these values under the keys 'sid', 'host' and 'host_path' or FALSE on error. *dbplus_restorepos()* > int dbplus_restorepos(resource relation, array tuple) *dbplus_rkeys()* > resource dbplus_rkeys(resource relation, mixed domlist) |dbplus_rkeys| will replace the current primary key for {relation} with the combination of domains specified by {domlist}. *dbplus_ropen()* > resource dbplus_ropen(string name) |dbplus_ropen| will open the relation {file} locally for quick access without any client/server overhead. Access is read only and only |dbplus_current| and |dbplus_next| may be applied to the returned relation. *dbplus_rquery()* > int dbplus_rquery(string query [, string dbpath]) |dbplus_rquery| performs a local (raw) AQL query using an AQL interpreter embedded into the db++ client library. |dbplus_rquery| is faster than |dbplus_aql| but will work on local data only. *dbplus_rrename()* > int dbplus_rrename(resource relation, string name) |dbplus_rrename| will change the name of {relation} to {name}. *dbplus_rsecindex()* > resource dbplus_rsecindex(resource relation, mixed domlist, int type) |dbplus_rsecindex| will create a new secondary index for {relation} with consists of the domains specified by {domlist} and is of type {type} *dbplus_runlink()* > int dbplus_runlink(resource relation) |dbplus_unlink| will close and remove the {relation}. *dbplus_rzap()* > int dbplus_rzap(resource relation) |dbplus_rzap| will remove all tuples from {relation}. *dbplus_savepos()* > int dbplus_savepos(resource relation) *dbplus_setindex()* > int dbplus_setindex(resource relation, string idx_name) *dbplus_setindexbynumber()* > int dbplus_setindexbynumber(resource relation, int idx_number) *dbplus_sql()* > resource dbplus_sql(string query [, string server [, string dbpath]]) *dbplus_tcl()* > int dbplus_tcl(int sid, string script) A db++ server will prepare a TCL interpreter for each client connection. This interpreter will enable the server to execute TCL code provided by the client as a sort of stored procedures to improve the performance of database operations by avoiding client/server data transfers and context switches. *dbplus_tremove()* > int dbplus_tremove(resource relation, array tuple) |dbplus_tremove| removes {tuple} from {relation} if it perfectly matches a tuple within the relation. {current}, if given, will contain the data of the new current tuple after calling |dbplus_tremove|. *dbplus_undo()* > int dbplus_undo(resource relation) *dbplus_undoprepare()* > int dbplus_undoprepare(resource relation) *dbplus_unlockrel()* > int dbplus_unlockrel(resource relation) |dbplus_unlockrel| will release a write lock previously obtained by |dbplus_lockrel|. *dbplus_unselect()* > int dbplus_unselect(resource relation) Calling |dbplus_unselect| will remove a constraint previously set by |dbplus_find| on {relation}. *dbplus_update()* > int dbplus_update(resource relation, array old, array new) |dbplus_update| replaces the tuple given by {old} with the data from {new} if and only if {old} completely matches a tuple within {relation}. *dbplus_xlockrel()* > int dbplus_xlockrel(resource relation) |dbplus_xlockrel| will request an exclusive lock on {relation} preventing even read access from other clients. *dbplus_xunlockrel()* > int dbplus_xunlockrel(resource relation) |dbplus_xunlockrel| will release an exclusive lock on {relation} previously obtained by |dbplus_xlockrel|. ============================================================================== Dbx *php-dbx* *dbx_close()* > bool dbx_close(object link_identifier) Returns TRUE on success or FALSE on failure.; *dbx_compare()* > int dbx_compare(array row_a, array row_b, string column_key [, int flags]) |dbx_compare| returns 0 if the row_a[$column_key] is equal to row_b[$column_key], and 1 or -1 if the former is greater or is smaller than the latter one, respectively, or vice versa if the {flag} is set to DBX_CMP_DESC. |dbx_compare| is a helper function for |dbx_sort| to ease the make and use of the custom sorting function. *dbx_connect()* > object dbx_connect(mixed module, string host, string database, string username, string password [, int persistent]) |dbx_connect| returns an object on success, FALSE on error. If a connection has been made but the database could not be selected, the connection is closed and FALSE is returned. The {persistent} parameter can be set to DBX_PERSISTENT, if so, a persistent connection will be created. *dbx_error()* > string dbx_error(object link_identifier) |dbx_error| returns a string containing the error message from the last function call of the abstracted module (e.g. mysql module). If there are multiple connections in the same module, just the last error is given. If there are connections on different modules, the latest error is returned for the module specified by the {link_identifier} parameter. *dbx_escape_string()* > string dbx_escape_string(object link_identifier, string text) |dbx_escape_string| returns the text, escaped where necessary (such as quotes, backslashes etc). It returns NULL on error. *dbx_fetch_row()* > object dbx_fetch_row(object result_identifier) |dbx_fetch_row| returns a row on success, and 0 on failure (e.g. when no more rows are available). When the DBX_RESULT_UNBUFFERED is not set in the query, |dbx_fetch_row| will fail as all rows have already been fetched into the results data property. *dbx_query()* > object dbx_query(object link_identifier, string sql_statement [, int flags]) |dbx_query| returns an object or 1 on success, and 0 on failure. The result object is returned only if the query given in {sql_statement} produces a result set (i.e. a SELECT query, even if the result set is empty). *dbx_sort()* > bool dbx_sort(object result, string user_compare_function) Returns TRUE on success or FALSE on failure.; ============================================================================== Dio *php-dio* *dio_close()* > void dio_close(resource fd) The function |dio_close| closes the file descriptor {fd}. *dio_fcntl()* > mixed dio_fcntl(resource fd, int cmd [, mixed args]) The |dio_fcntl| function performs the operation specified by {cmd} on the file descriptor {fd}. Some commands require additional arguments {args} to be supplied. *dio_open()* > resource dio_open(string filename, int flags [, int mode]) |dio_open| opens a file and returns a new file descriptor for it, or FALSE if any error occurred. If {flags} is O_CREAT, the optional third parameter {mode} will set the mode of the file (creation permissions). The {flags} parameter can be one of the following options: O_RDONLY - opens the file for read access. *dio_read()* > string dio_read(resource fd [, int n]) The function |dio_read| reads and returns {n} bytes from file with descriptor {fd}. If {n} is not specified, |dio_read| reads 1K sized block and returns them. *dio_seek()* > int dio_seek(resource fd, int pos [, int whence]) The function |dio_seek| is used to change the file position of the file with descriptor {fd}. The parameter {whence} specifies how the position {pos} should be interpreted: SEEK_SET (default) - specifies that {pos} is specified from the beginning of the file. *dio_stat()* > array dio_stat(resource fd) Function |dio_stat| returns information about the file with file descriptor {fd}. |dio_stat| returns an associative array with the following keys: "device" - device *dio_tcsetattr()* > void dio_tcsetattr(resource fd, array options) The function |dio_tcsetattr| sets the terminal attributes and baud rate of the open {resource}. The currently available options are 'baud' - baud rate of the port - can be 38400,19200,9600,4800,2400,1800, 1200,600,300,200,150,134,110,75 or 50, default value is 9600. *dio_truncate()* > bool dio_truncate(resource fd, int offset) Function |dio_truncate| causes the file referenced by {fd} to be truncated to at most {offset} bytes in size. If the file previously was larger than this size, the extra data is lost. If the file previously was shorter, it is unspecified whether the file is left unchanged or is extended. In the latter case the extended part reads as zero bytes. Returns TRUE on success or FALSE on failure.;. *dio_write()* > int dio_write(resource fd, string data [, int len]) The function |dio_write| writes up to {len} bytes from {data} to file {fd}. If {len} is not specified, |dio_write| writes all {data} to the specified file. |dio_write| returns the number of bytes written to {fd}. ============================================================================== Dir *php-dir* *chdir()* > bool chdir(string directory) Changes PHP's current directory to {directory}. Returns TRUE on success or FALSE on failure.; *chroot()* > bool chroot(string directory) Changes the root directory of the current process to {directory}. Returns TRUE on success or FALSE on failure.; *read()* > string read() A pseudo-object oriented mechanism for reading a directory. The given {directory} is opened. Two properties are available once the directory has been opened. The handle property can be used with other directory functions such as |readdir|, |rewinddir| and |closedir|. The path property is set to path the directory that was opened. Three methods are available: read, rewind and close. *closedir()* > void closedir(resource dir_handle) Closes the directory stream indicated by {dir_handle}. The stream must have previously been opened by |opendir|. *getcwd()* > string getcwd() Returns the current working directory, or FALSE on failure. *opendir()* > resource opendir(string path) Returns a directory handle to be used in subsequent |closedir|, |readdir|, and |rewinddir| calls. *readdir()* > string readdir(resource dir_handle) Returns the filename of the next file from the directory. The filenames are returned in the order in which they are stored by the filesystem. *rewinddir()* > void rewinddir(resource dir_handle) Resets the directory stream indicated by {dir_handle} to the beginning of the directory. *scandir()* > array scandir(string directory [, int sorting_order [, resource context]]) Returns an array of files and directories from the {directory}. If {directory} is not a directory, then boolean FALSE is returned, and an error of level E_WARNING is generated. ============================================================================== Dom *php-dom* *dom_import_simplexml()* > DOMElement dom_import_simplexml(SimpleXMLElement node) This function takes the node {node} of class SimpleXML and makes it into a DOMElement node. This new object can then be used as a native DOMElement node. If any errors occur, it returns FALSE. ============================================================================== Domxml *php-domxml* *domxml_new_doc()* > object domxml_new_doc(string version) Creates a new dom document from scratch and returns it. *domxml_open_file()* > object domxml_open_file(string filename [, int mode]) The function parses the XML document in the file named {filename} and returns an object of class "Dom document", having the properties as listed above. The file is accessed read-only. *domxml_open_mem()* > object domxml_open_mem(string str [, int mode]) The function parses the XML document in {str} and returns an object of class "Dom document", having the properties as listed above. This function, |domxml_open_file| or |domxml_new_doc| must be called before any other function calls. *domxml_version()* > string domxml_version() This function returns the version of the version of the XML library currently used. *domxml_xmltree()* > object domxml_xmltree(string str) The function parses the XML document in {str} and returns a tree PHP objects as the parsed document. This function is isolated from the other functions, which means you cannot access the tree with any of the other functions. Modifying it, for example by adding nodes, makes no sense since there is currently no way to dump it as an XML file. However this function may be valuable if you want to read a file and investigate the content. *domxml_xslt_stylesheet_doc()* > object domxml_xslt_stylesheet_doc() *domxml_xslt_stylesheet_file()* > object domxml_xslt_stylesheet_file() *domxml_xslt_stylesheet()* > object domxml_xslt_stylesheet() *xpath_eval_expression()* > object xpath_eval_expression(object xpath_context, string expression) |xpath_eval_expression| Example ]]> &example.outputs; int(1) ["nodeset"]=> array(1) { [0]=> object(domattribute)(5) { ["type"]=> int(2) ["name"]=> string(8) "language" ["value"]=> string(2) "en" [0]=> int(7) [1]=> int(138004256) } } } ]]> *xpath_eval()* > array xpath_eval( [object contextnode]) The optional {contextnode} can be specified for doing relative XPath queries. *xpath_new_context()* > object xpath_new_context() *xptr_eval()* > int xptr_eval( [object xpath_context, string eval_str]) *xptr_new_context()* > string xptr_new_context( [object doc_handle]) ============================================================================== Dotnet *php-dotnet* *dotnet_load()* > int dotnet_load(string assembly_name [, string datatype_name [, int codepage]]) ============================================================================== Errorfunc *php-errorfunc* *debug_backtrace()* > array debug_backtrace() |debug_backtrace| generates a PHP backtrace and returns this information as an associative array. The possible returned elements are listed in the following table: *debug_print_backtrace()* > void debug_print_backtrace() |debug_print_backtrace| prints a PHP backtrace. It prints the function calls, included/required files and |eval|ed stuff. *error_log()* > int error_log(string message [, int message_type [, string destination [, string extra_headers]]]) Sends an error message to the web server's error log, a TCP port or to a file. The first parameter, {message}, is the error message that should be logged. The second parameter, {message_type} says where the message should go: |error_log| log types 0 {message} is sent to PHP's system logger, using the Operating System's system logging mechanism or a file, depending on what the error_log configuration directive is set to. This is the default option. 1 {message} is sent by email to the address in the {destination} parameter. This is the only message type where the fourth parameter, {extra_headers} is used. This message type uses the same internal function as |mail| does. 2 {message} is sent through the PHP debugging connection. This option is only available if remote debugging has been enabled. In this case, the {destination} parameter specifies the host name or IP address and optionally, port number, of the socket receiving the debug information. 3 {message} is appended to the file {destination}. *error_reporting()* > int error_reporting( [int level]) The |error_reporting| function sets the error_reporting directive at runtime. PHP has many levels of errors, using this function sets that level for the duration (runtime) of your script. *restore_error_handler()* > void restore_error_handler() Used after changing the error handler function using |set_error_handler|, to revert to the previous error handler (which could be the built-in or a user defined function) *restore_exception_handler()* > void restore_exception_handler() Used after changing the exception handler function using |set_exception_handler|, to revert to the previous exception handler (which could be the built-in or a user defined function) *set_error_handler()* > mixed set_error_handler(callback error_handler [, int error_types]) Sets a user function ({error_handler}) to handle errors in a script. Returns a string containing the previously defined error handler (if any), or FALSE on error. If the previous handler was a class method, this function will return an indexed array with the class and the method name. *set_exception_handler()* > string set_exception_handler(callback exception_handler) Sets the default exception handler if an exception is not caught within a try/catch block. Execution will stop after the {exception_handler} is called. *trigger_error()* > bool trigger_error(string error_msg [, int error_type]) Used to trigger a user error condition, it can be used by in conjunction with the built-in error handler, or with a user defined function that has been set as the new error handler (|set_error_handler|). It only works with the E_USER family of constants, and will default to E_USER_NOTICE. *user_error()* > void user_error() This function is an alias of |trigger_error|. ============================================================================== Exec *php-exec* *escapeshellarg()* > string escapeshellarg(string arg) |escapeshellarg| adds single quotes around a string and quotes/escapes any existing single quotes allowing you to pass a string directly to a shell function and having it be treated as a single safe argument. This function should be used to escape individual arguments to shell functions coming from user input. The shell functions include |exec|, |system| and the backtick operator. A standard use would be: *escapeshellcmd()* > string escapeshellcmd(string command) |escapeshellcmd| escapes any characters in a string that might be used to trick a shell command into executing arbitrary commands. This function should be used to make sure that any data coming from user input is escaped before this data is passed to the |exec| or |system| functions, or to the backtick operator. A standard use would be: *exec()* > string exec(string command) |exec| executes the given {command}, however it does not output anything. It simply returns the last line from the result of the command. If you need to execute a command and have all the data from the command passed directly back without any interference, use the |passthru| function. *passthru()* > void passthru(string command) The |passthru| function is similar to the |exec| function in that it executes a {command}. If the {return_var} argument is present, the return status of the Unix command will be placed here. This function should be used in place of |exec| or |system| when the output from the Unix command is binary data which needs to be passed directly back to the browser. A common use for this is to execute something like the pbmplus utilities that can output an image stream directly. By setting the Content-type to image/gif and then calling a pbmplus program to output a gif, you can create PHP scripts that output images directly. *proc_close()* > int proc_close(resource process) |proc_close| is similar to |pclose| except that it only works on processes opened by |proc_open|. |proc_close| waits for the process to terminate, and returns its exit code. If you have open pipes to that process, you should |fclose| them prior to calling this function in order to avoid a deadlock - the child process may not be able to exit while the pipes are open. *proc_get_status()* > array proc_get_status(resource process) |proc_get_status| fetches data about a process opened using |proc_open|. The collected information is returned in an array containing the following elements: *proc_nice()* > bool proc_nice(int increment) |proc_nice| changes the priority of the current process by the amount specified in {increment}. A positive {increment} will lower the priority of the current process, whereas a negative {increment} will raise the priority. If an error occurs, like the user lacks permission to change the priority, an error of level E_WARNING is generated and FALSE is returned. Otherwise, TRUE is returned. *proc_open()* > resource proc_open(string cmd, array descriptorspec [, string cwd [, array env [, array other_options]]]) |proc_open| is similar to |popen| but provides a much greater degree of control over the program execution. {cmd} is the command to be executed by the shell. {descriptorspec} is an indexed array where the key represents the descriptor number and the value represents how PHP will pass that descriptor to the child process. {pipes} will be set to an indexed array of file pointers that correspond to PHP's end of any pipes that are created. The return value is a resource representing the process; you should free it using |proc_close| when you are finished with it. *proc_terminate()* > int proc_terminate(resource process [, int signal]) Signals a {process} (created using |proc_open|) that it should terminate. |proc_terminate| returns immediately and does not wait for the process to terminate. *shell_exec()* > string shell_exec(string cmd) This function is identical to the backtick operator. *system()* > string system(string command) |system| is just like the C version of the function in that it executes the given {command} and outputs the result. If a variable is provided as the second argument, then the return status code of the executed command will be written to this variable. ============================================================================== Exif *php-exif* *exif_imagetype()* > int exif_imagetype(string filename) |exif_imagetype| reads the first bytes of an image and checks its signature. *exif_read_data()* > array exif_read_data(string filename [, string sections [, bool arrays [, bool thumbnail]]]) |exif_read_data| reads the EXIF headers from a JPEG or TIFF image file. This way you can read meta data generated by digital cameras. *exif_tagname()* > string exif_tagname(string index) {index} The image index *exif_thumbnail()* > string exif_thumbnail(string filename) |exif_thumbnail| reads the embedded thumbnail of a TIFF or JPEG image. *read_exif_data()* > void read_exif_data() This function is an alias of |exif_read_data|. ============================================================================== Fam *php-fam* *fam_cancel_monitor()* > bool fam_cancel_monitor(resource fam, resource fam_monitor) |fam_cancel_monitor| terminates monitoring on a resource previously requested using one of the fam_monitor_ functions. In addition an FAMAcknowledge event occurs. *fam_close()* > void fam_close(resource fam) |fam_close| closes a connection to the FAM service previously opened using |fam_open|. *fam_monitor_collection()* > resource fam_monitor_collection(resource fam, string dirname, int depth, string mask) |fam_monitor_collection| requests monitoring for a collection of files within a directory. The actual files to be monitored are specified by a directory path in {dirname}, the maximum search {depth} starting from this directory and a shell pattern {mask} restricting the file names to look for. *fam_monitor_directory()* > resource fam_monitor_directory(resource fam, string dirname) |fam_monitor_directory| requests monitoring for a directory and all contained files. A FAM event will be generated whenever the status of the directory (i.e. the result of function |stat| on that directory) or its content (i.e. the results of |readdir|) change. *fam_monitor_file()* > resource fam_monitor_file(resource fam, string filename) |fam_monitor_file| requests monitoring for a single file. A FAM event will be generated whenever the file status (i.e. the result of function |stat| on that file) changes. *fam_next_event()* > array fam_next_event(resource fam) |fam_next_event| returns the next pending FAM event. The function will block until an event is available which can be checked for using |fam_pending|. *fam_open()* > resource fam_open() |fam_open| opens a connection to the FAM service daemon. The optional parameter {appname} should be set to a string identifying the application for logging reasons. *fam_pending()* > bool fam_pending(resource fam) |fam_pending| returns TRUE if events are available to be fetched using |fam_next_event|. *fam_resume_monitor()* > bool fam_resume_monitor(resource fam, resource fam_monitor) |fam_resume_monitor| resumes monitoring of a resource previously suspend using |fam_suspend_monitor|. *fam_suspend_monitor()* > bool fam_suspend_monitor(resource fam, resource fam_monitor) |fam_suspend_monitor| temporarily suspend monitoring of a resource previously requested using one of the fam_monitor_ functions. Monitoring can later be continued using |fam_resume_monitor| without the need of requesting a complete new monitor. ============================================================================== Fbsql *php-fbsql* *fbsql_affected_rows()* > int fbsql_affected_rows( [resource link_identifier]) |fbsql_affected_rows| returns the number of rows affected by the last INSERT, UPDATE or DELETE query associated with {link_identifier}. If the link identifier isn't specified, the last link opened by |fbsql_connect| is assumed. *fbsql_autocommit()* > bool fbsql_autocommit(resource link_identifier [, bool OnOff]) |fbsql_autocommit| returns the current autocommit status. If the optional OnOff parameter is given the auto commit status will be changed. With OnOff set to TRUE each statement will be committed automatically, if no errors was found. With OnOff set to FALSE the user must commit or rollback the transaction using either |fbsql_commit| or |fbsql_rollback|. *fbsql_blob_size()* > int fbsql_blob_size(string blob_handle [, resource link_identifier]) *fbsql_change_user()* > resource fbsql_change_user(string user, string password [, string database [, resource link_identifier]]) |fbsql_change_user| changes the logged in user of the current active connection, or the connection given by the optional parameter link_identifier. If a database is specified, this will default or current database after the user has been changed. If the new user and password authorization fails, the current connected user stays active. *fbsql_clob_size()* > int fbsql_clob_size(string clob_handle [, resource link_identifier]) *fbsql_close()* > bool fbsql_close( [resource link_identifier]) Returns: TRUE on success, FALSE on error. *fbsql_commit()* > bool fbsql_commit( [resource link_identifier]) Returns TRUE on success or FALSE on failure.; *fbsql_connect()* > resource fbsql_connect( [string hostname [, string username [, string password]]]) Returns a positive FrontBase link identifier on success, or an error message on failure. *fbsql_create_blob()* > string fbsql_create_blob(string blob_data [, resource link_identifier]) Returns: A resource handle to the newly created blob. *fbsql_create_clob()* > string fbsql_create_clob(string clob_data [, resource link_identifier]) Returns: A resource handle to the newly created CLOB. *fbsql_create_db()* > bool fbsql_create_db(string database_name [, resource link_identifier [, string database_options]]) |fbsql_create_db| attempts to create a new database named {database_name} on the server associated with the specified connection {link_identifier}. *fbsql_data_seek()* > bool fbsql_data_seek(resource result_identifier, int row_number) Returns TRUE on success or FALSE on failure.; *fbsql_database_password()* > string fbsql_database_password(resource link_identifier [, string database_password]) Returns: The database password associated with the link identifier. *fbsql_database()* > string fbsql_database(resource link_identifier [, string database]) *fbsql_db_query()* > resource fbsql_db_query(string database, string query [, resource link_identifier]) Returns: A positive FrontBase result identifier to the query result, or FALSE on error. *fbsql_db_status()* > int fbsql_db_status(string database_name [, resource link_identifier]) Returns: An integer value with the current status. *fbsql_drop_db()* > bool fbsql_drop_db(string database_name [, resource link_identifier]) Returns TRUE on success or FALSE on failure.; *fbsql_errno()* > int fbsql_errno( [resource link_identifier]) Returns the error number from the last fbsql function, or 0 (zero) if no error occurred. *fbsql_error()* > string fbsql_error( [resource link_identifier]) Returns the error text from the last fbsql function, or '' (the empty string) if no error occurred. *fbsql_fetch_array()* > array fbsql_fetch_array(resource result [, int result_type]) Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. *fbsql_fetch_assoc()* > array fbsql_fetch_assoc(resource result) Returns an associative array that corresponds to the fetched row, or FALSE if there are no more rows. *fbsql_fetch_field()* > object fbsql_fetch_field(resource result [, int field_offset]) Returns an object containing field information. *fbsql_fetch_lengths()* > array fbsql_fetch_lengths(resource result) Returns: An array that corresponds to the lengths of each field in the last row fetched by |fbsql_fetch_row|, or FALSE on error. *fbsql_fetch_object()* > object fbsql_fetch_object(resource result [, int result_type]) Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows. *fbsql_fetch_row()* > array fbsql_fetch_row(resource result) Returns: An array that corresponds to the fetched row, or FALSE if there are no more rows. *fbsql_field_flags()* > string fbsql_field_flags(resource result [, int field_offset]) |fbsql_field_flags| returns the field flags of the specified field. The flags are reported as a single word per flag separated by a single space, so that you can split the returned value using |explode|. *fbsql_field_len()* > int fbsql_field_len(resource result [, int field_offset]) |fbsql_field_len| returns the length of the specified field. *fbsql_field_name()* > string fbsql_field_name(resource result [, int field_index]) |fbsql_field_name| returns the name of the specified field index. {result} must be a valid result identifier and {field_index} is the numerical offset of the field. *fbsql_field_seek()* > bool fbsql_field_seek(resource result [, int field_offset]) Seeks to the specified field offset. If the next call to |fbsql_fetch_field| doesn't include a field offset, the field offset specified in |fbsql_field_seek| will be returned. *fbsql_field_table()* > string fbsql_field_table(resource result [, int field_offset]) Returns the name of the table that the specified field is in. *fbsql_field_type()* > string fbsql_field_type(resource result [, int field_offset]) |fbsql_field_type| is similar to the |fbsql_field_name| function. The arguments are identical, but the field type is returned instead. The field type will be one of "int", "real", "string", "blob", and others as detailed in the FrontBase documentation. |fbsql_field_type| example "; echo "The table has the following fields "; while ($i < $fields) { $type = fbsql_field_type($result, $i); $name = fbsql_field_name($result, $i); $len = fbsql_field_len($result, $i); $flags = fbsql_field_flags($result, $i); echo $type . " " . $name . " " . $len . " " . $flags . ""; $i++; } fbsql_close(); ?> ]]> *fbsql_free_result()* > bool fbsql_free_result(resource result) |fbsql_free_result| will free all memory associated with the result identifier {result}. *fbsql_get_autostart_info()* > array fbsql_get_autostart_info( [resource link_identifier]) *fbsql_hostname()* > string fbsql_hostname(resource link_identifier [, string host_name]) *fbsql_insert_id()* > int fbsql_insert_id( [resource link_identifier]) |fbsql_insert_id| returns the ID generated for an column defined as DEFAULT UNIQUE by the previous INSERT query using the given {link_identifier}. If {link_identifier} isn't specified, the last opened link is assumed. *fbsql_list_dbs()* > resource fbsql_list_dbs( [resource link_identifier]) |fbsql_list_dbs| will return a result pointer containing the databases available from the current fbsql daemon. Use the |fbsql_tablename| function to traverse this result pointer. *fbsql_list_fields()* > resource fbsql_list_fields(string database_name, string table_name [, resource link_identifier]) |fbsql_list_fields| retrieves information about the given tablename. Arguments are the database name and the table name. A result pointer is returned which can be used with |fbsql_field_flags|, |fbsql_field_len|, |fbsql_field_name|, and |fbsql_field_type|. *fbsql_list_tables()* > resource fbsql_list_tables(string database [, resource link_identifier]) |fbsql_list_tables| takes a database name and returns a result pointer much like the |fbsql_db_query| function. The |fbsql_tablename| function should be used to extract the actual table names from the result pointer. *fbsql_next_result()* > bool fbsql_next_result(resource result_id) When sending more than one SQL statement to the server or executing a stored procedure with multiple results will cause the server to return multiple result sets. This function will test for additional results available form the server. If an additional result set exists it will free the existing result set and prepare to fetch the words from the new result set. The function will return TRUE if an additional result set was available or FALSE otherwise. *fbsql_num_fields()* > int fbsql_num_fields(resource result) |fbsql_num_fields| returns the number of fields in a result set. *fbsql_num_rows()* > int fbsql_num_rows(resource result) |fbsql_num_rows| returns the number of rows in a result set. This command is only valid for SELECT statements. To retrieve the number of rows returned from a INSERT, UPDATE or DELETE query, use |fbsql_affected_rows|. |fbsql_num_rows| example ]]> *fbsql_password()* > string fbsql_password(resource link_identifier [, string password]) *fbsql_pconnect()* > resource fbsql_pconnect( [string hostname [, string username [, string password]]]) Returns: A positive FrontBase persistent link identifier on success, or FALSE on error. *fbsql_query()* > resource fbsql_query(string query [, resource link_identifier [, int batch_size]]) |fbsql_query| sends a query to the currently active database on the server that's associated with the specified link identifier. If {link_identifier} isn't specified, the last opened link is assumed. If no link is open, the function tries to establish a link as if |fbsql_connect| was called with no arguments, and use it. *fbsql_read_blob()* > string fbsql_read_blob(string blob_handle [, resource link_identifier]) Returns: A string containing the BLOB specified by blob_handle. *fbsql_read_clob()* > string fbsql_read_clob(string clob_handle [, resource link_identifier]) Returns: A string containing the CLOB specified by clob_handle. *fbsql_result()* > mixed fbsql_result(resource result [, int row [, mixed field]]) |fbsql_result| returns the contents of one cell from a FrontBase result set. The field argument can be the field's offset, or the field's name, or the field's table dot field's name (tabledname.fieldname). If the column name has been aliased ('select foo as bar from...'), use the alias instead of the column name. *fbsql_rollback()* > bool fbsql_rollback( [resource link_identifier]) Returns TRUE on success or FALSE on failure.; *fbsql_select_db()* > bool fbsql_select_db( [string database_name [, resource link_identifier]]) |fbsql_select_db| sets the current active database on the server that's associated with the specified link identifier. If no link identifier is specified, the last opened link is assumed. If no link is open, the function will try to establish a link as if |fbsql_connect| was called, and use it. *fbsql_set_lob_mode()* > bool fbsql_set_lob_mode(resource result, string database_name) Returns: TRUE on success, FALSE on error. *fbsql_set_password()* > bool fbsql_set_password(resource link_identifier, string user, string password, string old_password) *fbsql_set_transaction()* > void fbsql_set_transaction(resource link_identifier, int Locking, int Isolation) *fbsql_start_db()* > bool fbsql_start_db(string database_name [, resource link_identifier [, string database_options]]) Returns TRUE on success or FALSE on failure.; *fbsql_stop_db()* > bool fbsql_stop_db(string database_name [, resource link_identifier]) Returns TRUE on success or FALSE on failure.; *fbsql_tablename()* > string fbsql_tablename(resource result, int i) |fbsql_tablename| takes a result pointer returned by the |fbsql_list_tables| function as well as an integer index and returns the name of a table. The |fbsql_num_rows| function may be used to determine the number of tables in the result pointer. |fbsql_tablename| example "; $i++; } ?> ]]> *fbsql_username()* > string fbsql_username(resource link_identifier [, string username]) *fbsql_warnings()* > bool fbsql_warnings( [bool OnOff]) Returns TRUE if warnings is turned on otherwise FALSE. ============================================================================== Fdf *php-fdf* *fdf_add_doc_javascript()* > bool fdf_add_doc_javascript(resource fdfdoc, string script_name, string script_code) Adds a script to the FDF, which Acrobat then adds to the doc-level scripts of a document, once the FDF is imported into it. It is strongly suggested to use '\r' for linebreaks within {script_code}. *fdf_add_template()* > bool fdf_add_template(resource fdfdoc, int newpage, string filename, string template, int rename) *fdf_close()* > bool fdf_close(resource fdf_document) The |fdf_close| function closes the FDF document. *fdf_create()* > resource fdf_create() The |fdf_create| creates a new FDF document. This function is needed if one would like to populate input fields in a PDF document with data. *fdf_enum_values()* > bool fdf_enum_values(resource fdfdoc, callback function) *fdf_errno()* > int fdf_errno() |fdf_errno| returns the error code set by the last FDF function call. This is zero for a successfull operation or a non-zero error code on failure. A textual description may be obtained using the |fdf_error| function. *fdf_error()* > string fdf_error() |fdf_error| returns a textual description for the fdf error code given in {error_code}. The function uses the internal error code set by the last operation if no {error_code} is given, so fdf_error() is a convenient shortcut for fdf_error(fdf_errno()). *fdf_get_ap()* > bool fdf_get_ap(resource fdf_document, string field, int face, string filename) The |fdf_get_ap| function gets the appearance of a {field} (i.e. the value of the /AP key) and stores it in a file. The possible values of {face} are FDFNormalAP, FDFRolloverAP and FDFDownAP. The appearance is stored in {filename}. *fdf_get_attachment()* > array fdf_get_attachment(resource fdf_document, string fieldname, string savepath) Extracts a file uploaded by means of the "file selection" field {fieldname} and stores it under {savepath}. {savepath} may be the name of a plain file or an existing directory in which the file is to be created under its original name. Any existing file under the same name will be overwritten. *fdf_get_encoding()* > string fdf_get_encoding(resource fdf_document) The |fdf_get_encoding| returns the value of the /Encoding key. An empty string is returned if the default PDFDocEncoding/Unicode scheme is used. *fdf_get_file()* > string fdf_get_file(resource fdf_document) The |fdf_set_file| returns the value of the /F key. *fdf_get_flags()* > int fdf_get_flags(resource fdfdoc, string fieldname, int whichflags) *fdf_get_opt()* > mixed fdf_get_opt(resource fdfdof, string fieldname) *fdf_get_status()* > string fdf_get_status(resource fdf_document) The |fdf_get_status| returns the value of the /STATUS key. *fdf_get_value()* > string fdf_get_value(resource fdf_document, string fieldname) The |fdf_get_value| function returns the value for the requested {fieldname}. *fdf_get_version()* > string fdf_get_version() This function will return the fdf version for the given {fdf_document}, or the toolkit API version number if no parameter is given. *fdf_header()* > bool fdf_header() This is a convenience function to set appropriate HTTP headers for FDF output. It sets the Content-type: to application/vnd.fdf. *fdf_next_field_name()* > string fdf_next_field_name(resource fdf_document [, string fieldname]) The |fdf_next_field_name| function returns the name of the field after the field in {fieldname} or the field name of the first field if the second parameter is NULL. *fdf_open_string()* > resource fdf_open_string(string fdf_data) The |fdf_open_string| function reads form data from a string. {fdf_data} must contain the data as returned from a PDF form or created using |fdf_create| and |fdf_save_string|. *fdf_open()* > resource fdf_open(string filename) The |fdf_open| function opens a file with form data. This file must contain the data as returned from a PDF form or created using |fdf_create| and |fdf_save|. *fdf_remove_item()* > bool fdf_remove_item(resource fdfdoc, string fieldname, int item) *fdf_save_string()* > string fdf_save_string(resource fdf_document) The |fdf_save_string| function returns the FDF document as a string. *fdf_save()* > bool fdf_save(resource fdf_document) The |fdf_save| function saves a FDF document. The resulting FDF will be written to {filename}. Without a {filename} |fdf_save| will write the FDF to the default PHP output stream. *fdf_set_ap()* > bool fdf_set_ap(resource fdf_document, string field_name, int face, string filename, int page_number) The |fdf_set_ap| function sets the appearance of a field (i.e. the value of the /AP key). The possible values of {face} are FDFNormalAP, FDFRolloverAP and FDFDownAP. *fdf_set_encoding()* > bool fdf_set_encoding(resource fdf_document, string encoding) |fdf_set_encoding| sets the character encoding in FDF document {fdf_document}. {encoding} should be the valid encoding name. Currently the following values are supported: "Shift-JIS", "UHC", "GBK","BigFive". An empty string resets the encoding to the default PDFDocEncoding/Unicode scheme. *fdf_set_file()* > bool fdf_set_file(resource fdf_document, string url) The |fdf_set_file| selects a different PDF document to display the form results in then the form it originated from. The {url} needs to be given as an absolute URL. *fdf_set_flags()* > bool fdf_set_flags(resource fdf_document, string fieldname, int whichFlags, int newFlags) The |fdf_set_flags| sets certain flags of the given field {fieldname}. *fdf_set_javascript_action()* > bool fdf_set_javascript_action(resource fdf_document, string fieldname, int trigger, string script) |fdf_set_javascript_action| sets a javascript action for the given field {fieldname}. *fdf_set_on_import_javascript()* > bool fdf_set_on_import_javascript(resource fdfdoc, string script) See also |fdf_add_doc_javascript|&listendand; |fdf_set_javascript_action|. *fdf_set_opt()* > bool fdf_set_opt(resource fdf_document, string fieldname, int element, string str1, string str2) The |fdf_set_opt| sets options of the given field {fieldname}. *fdf_set_status()* > bool fdf_set_status(resource fdf_document, string status) The |fdf_set_status| sets the value of the /STATUS key. When a client receives a FDF with a status set it will present the value in an alert box. *fdf_set_submit_form_action()* > bool fdf_set_submit_form_action(resource fdf_document, string fieldname, int trigger, string script, int flags) The |fdf_set_submit_form_action| sets a submit form action for the given field {fieldname}. *fdf_set_target_frame()* > bool fdf_set_target_frame(resource fdf_document, string frame_name) Sets the target frame to display a result PDF defined with |fdf_save_file| in. *fdf_set_value()* > bool fdf_set_value(resource fdf_document, string fieldname, mixed value) The |fdf_set_value| function sets the {value} for a field named {fieldname}. The {value} will be stored as a string unless it is an array. In this case all array elements will be stored as a value array. *fdf_set_version()* > string fdf_set_version(resource fdf_document, string version) This function will set the fdf {version} for the given {fdf_document}. Some features supported by this extension are only available in newer fdf versions. For the current FDF toolkit 5.0 {version} may be either '1.2', '1.3' or '1.4'. ============================================================================== Filepro *php-filepro* *filepro_fieldcount()* > int filepro_fieldcount() Returns the number of fields (columns) in the opened filePro database. *filepro_fieldname()* > string filepro_fieldname(int field_number) Returns the name of the field corresponding to {field_number}. *filepro_fieldtype()* > string filepro_fieldtype(int field_number) Returns the edit type of the field corresponding to {field_number}. *filepro_fieldwidth()* > int filepro_fieldwidth(int field_number) Returns the width of the field corresponding to {field_number}. *filepro_retrieve()* > string filepro_retrieve(int row_number, int field_number) Returns the data from the specified location in the database. The {row_number} parameter must be between zero and the total number of rows minus one (0..|filepro_rowcount| - 1). Likewise, {field_number} accepts values between zero and the total number of fields minus one (0..|filepro_fieldcount| - 1) *filepro_rowcount()* > int filepro_rowcount() Returns the number of rows in the opened filePro database. *filepro()* > bool filepro(string directory) This reads and verifies the map file, storing the field count and info. ============================================================================== Filesystem *php-filesystem* *basename()* > string basename(string path [, string suffix]) Given a string containing a path to a file, this function will return the base name of the file. If the filename ends in {suffix} this will also be cut off. *chgrp()* > bool chgrp(string filename, mixed group) Attempts to change the group of the file {filename} to {group} (specified by name or number). Only the superuser may change the group of a file arbitrarily; other users may change the group of a file to any group of which that user is a member. *chmod()* > bool chmod(string filename, int mode) Attempts to change the mode of the file specified by {filename} to that given in {mode}. *chown()* > bool chown(string filename, mixed user) Attempts to change the owner of the file {filename} to user {user} (specified by name or number). Only the superuser may change the owner of a file. *clearstatcache()* > void clearstatcache() When you use |stat|, |lstat|, or any of the other functions listed in the affected functions list (below), PHP caches the information those functions return in order to provide faster performance. However, in certain cases, you may want to clear the cached information. For instance, if the same file is being checked multiple times within a single script, and that file is in danger of being removed or changed during that script's operation, you may elect to clear the status cache. In these cases, you can use the |clearstatcache| function to clear the information that PHP caches about a file. *copy()* > bool copy(string source, string dest) Makes a copy of the file {source} to {dest}. Returns TRUE on success or FALSE on failure.; |copy| example ]]> *delete()* > void delete(string file) This is a dummy manual entry to satisfy those people who are looking for |unlink| or |unset| in the wrong place. *dirname()* > string dirname(string path) Given a string containing a path to a file, this function will return the name of the directory. *disk_free_space()* > float disk_free_space(string directory) Given a string containing a directory, this function will return the number of bytes available on the corresponding filesystem or disk partition. *disk_total_space()* > float disk_total_space(string directory) Given a string containing a directory, this function will return the total number of bytes on the corresponding filesystem or disk partition. *diskfreespace()* > void diskfreespace() This function is an alias of |disk_free_space|. *fclose()* > bool fclose(resource handle) The file pointed to by {handle} is closed. *feof()* > bool feof(resource handle) Returns TRUE if the file pointer is at EOF or an error occurs (including socket timeout); otherwise returns FALSE. *fflush()* > bool fflush(resource handle) This function forces a write of all buffered output to the resource pointed to by the file handle {handle}. Returns TRUE on success or FALSE on failure.; *fgetc()* > string fgetc(resource handle) Returns a string containing a single character read from the file pointed to by {handle}. Returns FALSE on EOF. *fgetcsv()* > array fgetcsv(resource handle [, int length [, string delimiter [, string enclosure]]]) {handle} A valid file pointer to a file successfully opened by |fopen|, |popen|, or |fsockopen|. {length} (Optional) Must be greater than the longest line (in characters) to be found in the CSV file (allowing for trailing line-end characters). It became optional in PHP 5. {delimiter} (Optional) Set the field delimiter (one character only). Defaults as a comma. {enclosure} (Optional) Set the field enclosure character (one character only). Defaults as a double quotation mark. Added in PHP 4.3.0. *fgets()* > string fgets(resource handle [, int length]) Returns a string of up to {length} - 1 bytes read from the file pointed to by {handle}. Reading ends when {length} - 1 bytes have been read, on a newline (which is included in the return value), or on EOF (whichever comes first). If no length is specified, the length defaults to 1k, or 1024 bytes. *fgetss()* > string fgetss(resource handle [, int length [, string allowable_tags]]) Identical to |fgets|, except that fgetss attempts to strip any HTML and PHP tags from the text it reads. *file_exists()* > bool file_exists(string filename) Returns TRUE if the file or directory specified by {filename} exists; FALSE otherwise. *file_get_contents()* > string file_get_contents(string filename [, bool use_include_path [, resource context [, int offset]]]) Identical to |file|, except that |file_get_contents| returns the file in a string, starting at the specified {offset}. On failure, |file_get_contents| will return FALSE. *file_put_contents()* > int file_put_contents(string filename, mixed data [, int flags [, resource context]]) Identical to calling |fopen|, |fwrite|, and |fclose| successively. The function returns the amount of bytes that were written to the file. *file()* > array file(string filename [, int use_include_path [, resource context]]) Identical to |readfile|, except that |file| returns the file in an array. Each element of the array corresponds to a line in the file, with the newline still attached. Upon failure, |file| returns FALSE. *fileatime()* > int fileatime(string filename) Returns the time the file was last accessed, or FALSE in case of an error. The time is returned as a Unix timestamp. *filectime()* > int filectime(string filename) Returns the time the file was last changed, or FALSE in case of an error. The time is returned as a Unix timestamp. *filegroup()* > int filegroup(string filename) Returns the group ID of the file, or FALSE in case of an error. The group ID is returned in numerical format, use |posix_getgrgid| to resolve it to a group name. Upon failure, FALSE is returned along with an error of level E_WARNING. *fileinode()* > int fileinode(string filename) Returns the inode number of the file, or FALSE in case of an error. *filemtime()* > int filemtime(string filename) Returns the time the file was last modified, or FALSE in case of an error. The time is returned as a Unix timestamp, which is suitable for the |date| function. *fileowner()* > int fileowner(string filename) Returns the user ID of the owner of the file, or FALSE in case of an error. The user ID is returned in numerical format, use |posix_getpwuid| to resolve it to a username. *fileperms()* > int fileperms(string filename) Returns the permissions on the file, or FALSE in case of an error. *filesize()* > int filesize(string filename) Returns the size of the file in bytes, or FALSE in case of an error. *filetype()* > string filetype(string filename) Returns the type of the file. Possible values are fifo, char, dir, block, link, file, and unknown. *flock()* > bool flock(resource handle, int operation) PHP supports a portable way of locking complete files in an advisory way (which means all accessing programs have to use the same way of locking or it will not work). *fnmatch()* > bool fnmatch(string pattern, string string [, int flags]) |fnmatch| checks if the passed {string} would match the given shell wildcard {pattern}. *fopen()* > resource fopen(string filename, string mode [, bool use_include_path [, resource zcontext]]) |fopen| binds a named resource, specified by {filename}, to a stream. If {filename} is of the form "scheme://...", it is assumed to be a URL and PHP will search for a protocol handler (also known as a wrapper) for that scheme. If no wrappers for that protocol are registered, PHP will emit a notice to help you track potential problems in your script and then continue as though {filename} specifies a regular file. *fpassthru()* > int fpassthru(resource handle) Reads to EOF on the given file pointer from the current position and writes the results to the output buffer. *fputcsv()* > int fputcsv(resource handle [, array fields [, string delimiter [, string enclosure]]]) |fputcsv| formats a line (passed as a {fields} array) as CSV and write it to the specified file {handle}. Returns the length of the written string, or FALSE on failure. *fputs()* > void fputs() This function is an alias of |fwrite|. *fread()* > string fread(resource handle, int length) |fread| reads up to {length} bytes from the file pointer referenced by {handle}. Reading stops when {length} bytes have been read, EOF (end of file) is reached, or (for network streams) when a packet becomes available, whichever comes first. *fscanf()* > mixed fscanf(resource handle, string format) The function |fscanf| is similar to |sscanf|, but it takes its input from a file associated with {handle} and interprets the input according to the specified {format}, which is described in the documentation for |sprintf|. If only two parameters were passed to this function, the values parsed will be returned as an array. Otherwise, if optional parameters are passed, the function will return the number of assigned values. The optional parameters must be passed by reference. *fseek()* > int fseek(resource handle, int offset [, int whence]) Sets the file position indicator for the file referenced by {handle}. The new position, measured in bytes from the beginning of the file, is obtained by adding {offset} to the position specified by {whence}, whose values are defined as follows: SEEK_SET - Set position equal to {offset} bytes. SEEK_CUR - Set position to current location plus {offset}. SEEK_END - Set position to end-of-file plus {offset}. (To move to a position before the end-of-file, you need to pass a negative value in {offset}.) *fstat()* > array fstat(resource handle) Gathers the statistics of the file opened by the file pointer {handle}. This function is similar to the |stat| function except that it operates on an open file pointer instead of a filename. *ftell()* > int ftell(resource handle) Returns the position of the file pointer referenced by {handle}; i.e., its offset into the file stream. *ftruncate()* > bool ftruncate(resource handle, int size) Takes the filepointer, {handle}, and truncates the file to length, {size}. Returns TRUE on success or FALSE on failure.; *fwrite()* > int fwrite(resource handle, string string [, int length]) |fwrite| writes the contents of {string} to the file stream pointed to by {handle}. If the {length} argument is given, writing will stop after {length} bytes have been written or the end of {string} is reached, whichever comes first. *glob()* > array glob(string pattern [, int flags]) The |glob| function searches for all the pathnames matching {pattern} according to the rules used by the libc glob() function, which is similar to the rules used by common shells. No tilde expansion or parameter substitution is done. *is_dir()* > bool is_dir(string filename) Returns TRUE if the filename exists and is a directory. If {filename} is a relative filename, it will be checked relative to the current working directory. *is_executable()* > bool is_executable(string filename) Returns TRUE if the filename exists and is executable. *is_file()* > bool is_file(string filename) Returns TRUE if the filename exists and is a regular file. *is_link()* > bool is_link(string filename) Returns TRUE if the filename exists and is a symbolic link. *is_readable()* > bool is_readable(string filename) Returns TRUE if the filename exists and is readable. *is_uploaded_file()* > bool is_uploaded_file(string filename) Returns TRUE if the file named by {filename} was uploaded via HTTP POST. This is useful to help ensure that a malicious user hasn't tried to trick the script into working on files upon which it should not be working--for instance, /etc/passwd. *is_writable()* > bool is_writable(string filename) Returns TRUE if the {filename} exists and is writable. The filename argument may be a directory name allowing you to check if a directory is writeable. *is_writeable()* > void is_writeable() This function is an alias of |is_writable|. *link()* > bool link(string target, string link) |link| creates a hard link. Returns TRUE on success or FALSE on failure.; *linkinfo()* > int linkinfo(string path) |linkinfo| returns the st_dev field of the Unix C stat structure returned by the lstat system call. This function is used to verify if a link (pointed to by {path}) really exists (using the same method as the S_ISLNK macro defined in stat.h). Returns 0 or FALSE in case of error. *lstat()* > array lstat(string filename) Gathers the statistics of the file or symbolic link named by {filename}. This function is identical to the |stat| function except that if the {filename} parameter is a symbolic link, the status of the symbolic link is returned, not the status of the file pointed to by the symbolic link. *mkdir()* > bool mkdir(string pathname [, int mode [, bool recursive [, resource context]]]) Attempts to create the directory specified by pathname. *move_uploaded_file()* > bool move_uploaded_file(string filename, string destination) This function checks to ensure that the file designated by {filename} is a valid upload file (meaning that it was uploaded via PHP's HTTP POST upload mechanism). If the file is valid, it will be moved to the filename given by {destination}. *parse_ini_file()* > array parse_ini_file(string filename [, bool process_sections]) |parse_ini_file| loads in the ini file specified in {filename}, and returns the settings in it in an associative array. By setting the last {process_sections} parameter to TRUE, you get a multidimensional array, with the section names and settings included. The default for {process_sections} is FALSE *pathinfo()* > array pathinfo(string path [, int options]) |pathinfo| returns an associative array containing information about {path}. The following array elements are returned: dirname, basename and extension. *pclose()* > int pclose(resource handle) Closes a file pointer to a pipe opened by |popen|. *popen()* > resource popen(string command, string mode) Opens a pipe to a process executed by forking the command given by command. *readfile()* > int readfile(string filename [, bool use_include_path [, resource context]]) Reads a file and writes it to the output buffer. *readlink()* > string readlink(string path) |readlink| does the same as the readlink C function and returns the contents of the symbolic link path or FALSE in case of error. *realpath()* > string realpath(string path) |realpath| expands all symbolic links and resolves references to '/./', '/../' and extra '/' characters in the input {path} and return the canonicalized absolute pathname. The resulting path will have no symbolic link, '/./' or '/../' components. *rename()* > bool rename(string oldname, string newname [, resource context]) Attempts to rename {oldname} to {newname}. *rewind()* > bool rewind(resource handle) Sets the file position indicator for {handle} to the beginning of the file stream. *rmdir()* > bool rmdir(string dirname [, resource context]) Attempts to remove the directory named by {dirname}. The directory must be empty, and the relevant permissions must permit this. Returns TRUE on success or FALSE on failure.; *set_file_buffer()* > void set_file_buffer() This function is an alias of |stream_set_write_buffer|. *stat()* > array stat(string filename) Gathers the statistics of the file named by {filename}. If {filename} is a symbolic link, statistics are from the file itself, not the symlink. |lstat| is identical to stat except it would instead be based off the symlinks status. *symlink()* > bool symlink(string target, string link) |symlink| creates a symbolic link from the existing {target} with the specified name {link}. *tempnam()* > string tempnam(string dir, string prefix) Creates a file with a unique filename in the specified directory. If the directory does not exist, |tempnam| may generate a file in the system's temporary directory, and return the name of that. *tmpfile()* > resource tmpfile() Creates a temporary file with an unique name in read-write (w+) mode, returning a file handle similar to the one returned by |fopen|. The file is automatically removed when closed (using |fclose|), or when the script ends. *touch()* > bool touch(string filename [, int time [, int atime]]) Attempts to set the access and modification time of the file named by {filename} to the value given by {time}. If the parameter {time} is not given, uses the present time. This is equivalent to what utime (sometimes referred to as utimes) does. If the third parameter {atime} is present, the access time of the given filename is set to the value of {atime}. Note that the access time is always modified, regardless of the number of parameters. *umask()* > int umask( [int mask]) |umask| sets PHP's umask to {mask} & 0777 and returns the old umask. When PHP is being used as a server module, the umask is restored when each request is finished. *unlink()* > bool unlink(string filename [, resource context]) Deletes {filename}. Similar to the Unix C unlink() function. Returns TRUE on success or FALSE on failure.; ============================================================================== Fribidi *php-fribidi* *fribidi_log2vis()* > string fribidi_log2vis(string str, string direction, int charset) ============================================================================== Ftp *php-ftp* *ftp_alloc()* > bool ftp_alloc(resource ftp_stream, int filesize) Sends an ALLO command to the remote FTP server to allocate {filesize} bytes of space. Returns TRUE on success, or FALSE on failure. *ftp_cdup()* > bool ftp_cdup(resource ftp_stream) Changes to the parent directory. *ftp_chdir()* > bool ftp_chdir(resource ftp_stream, string directory) Changes the current directory to the specified {directory}. *ftp_chmod()* > int ftp_chmod(resource ftp_stream, int mode, string filename) Sets the permissions on the remote file specified by {filename} to {mode} given as an octal value. *ftp_close()* > bool ftp_close(resource ftp_stream) |ftp_close| closes {ftp_stream} and releases the resource. After calling this function, you can no longer use the FTP connection and must create a new one with |ftp_connect|. *ftp_connect()* > resource ftp_connect(string host [, int port [, int timeout]]) Returns a FTP stream on success or FALSE on error. *ftp_delete()* > bool ftp_delete(resource ftp_stream, string path) |ftp_delete| deletes the file specified by {path} from the FTP server. *ftp_exec()* > bool ftp_exec(resource ftp_stream, string command) Sends a SITE EXEC {command} request to the FTP server. Returns TRUE if the command was successful (server sent response code: 200); otherwise returns FALSE. *ftp_fget()* > bool ftp_fget(resource ftp_stream, resource handle, string remote_file, int mode [, int resumepos]) |ftp_fget| retrieves {remote_file} from the FTP server, and writes it to the given file pointer, {handle}. The transfer {mode} specified must be either FTP_ASCII or FTP_BINARY. *ftp_fput()* > bool ftp_fput(resource ftp_stream, string remote_file, resource handle, int mode [, int startpos]) |ftp_fput| uploads the data from the file pointer {handle} until the end of the file is reached. The results are stored in {remote_file} on the FTP server. The transfer {mode} specified must be either FTP_ASCII or FTP_BINARY. *ftp_get_option()* > mixed ftp_get_option(resource ftp_stream, int option) Returns the value on success or FALSE if the given {option} is not supported. In the latter case, a warning message is also thrown. *ftp_get()* > bool ftp_get(resource ftp_stream, string local_file, string remote_file, int mode [, int resumepos]) |ftp_get| retrieves {remote_file} from the FTP server, and saves it to {local_file} locally. The transfer {mode} specified must be either FTP_ASCII or FTP_BINARY. *ftp_login()* > bool ftp_login(resource ftp_stream, string username, string password) Logs in to the given FTP stream. *ftp_mdtm()* > int ftp_mdtm(resource ftp_stream, string remote_file) |ftp_mdtm| checks the last modified time for a file, and returns it as a Unix timestamp. If an error occurs, or the file does not exist, -1 is returned. *ftp_mkdir()* > string ftp_mkdir(resource ftp_stream, string directory) Creates the specified {directory} on the FTP server. *ftp_nb_continue()* > int ftp_nb_continue(resource ftp_stream) Continues retrieving/sending a file non-blocking. *ftp_nb_fget()* > int ftp_nb_fget(resource ftp_stream, resource handle, string remote_file, int mode [, int resumepos]) |ftp_nb_fget| retrieves {remote_file} from the FTP server, and writes it to the given file pointer, {handle}. The transfer {mode} specified must be either FTP_ASCII or FTP_BINARY. The difference between this function and the |ftp_fget| is that this function retrieves the file asynchronously, so your program can perform other operations while the file is being downloaded. *ftp_nb_fput()* > int ftp_nb_fput(resource ftp_stream, string remote_file, resource handle, int mode [, int startpos]) |ftp_nb_fput| uploads the data from the file pointer {handle} until it reaches the end of the file. The results are stored in {remote_file} on the FTP server. The transfer {mode} specified must be either FTP_ASCII or FTP_BINARY. The difference between this function and the |ftp_fput| is that this function uploads the file asynchronously, so your program can perform other operations while the file is being uploaded. *ftp_nb_get()* > int ftp_nb_get(resource ftp_stream, string local_file, string remote_file, int mode [, int resumepos]) |ftp_nb_get| retrieves {remote_file} from the FTP server, and saves it to {local_file} locally. The transfer {mode} specified must be either FTP_ASCII or FTP_BINARY. The difference between this function and the |ftp_get| is that this function retrieves the file asynchronously, so your program can perform other operations while the file is being downloaded. *ftp_nb_put()* > int ftp_nb_put(resource ftp_stream, string remote_file, string local_file, int mode [, int startpos]) |ftp_nb_put| stores {local_file} on the FTP server, as {remote_file}. The transfer {mode} specified must be either FTP_ASCII or FTP_BINARY. The difference between this function and the |ftp_put| is that this function uploads the file asynchronously, so your program can perform other operations while the file is being uploaded. *ftp_nlist()* > array ftp_nlist(resource ftp_stream, string directory) Returns an array of filenames from the specified directory on success or FALSE on error. *ftp_pasv()* > bool ftp_pasv(resource ftp_stream, bool pasv) |ftp_pasv| turns on passive mode if the {pasv} parameter is TRUE. It turns off passive mode if {pasv} is FALSE. In passive mode, data connections are initiated by the client, rather than by the server. *ftp_put()* > bool ftp_put(resource ftp_stream, string remote_file, string local_file, int mode [, int startpos]) |ftp_put| stores {local_file} on the FTP server, as {remote_file}. The transfer {mode} specified must be either FTP_ASCII or FTP_BINARY. *ftp_pwd()* > string ftp_pwd(resource ftp_stream) Returns the current directory or FALSE on error. *ftp_quit()* > void ftp_quit() This function is an alias of |ftp_close|. *ftp_raw()* > array ftp_raw(resource ftp_stream, string command) Sends an arbitrary {command} to the FTP server. Returns the server's response as an array of strings. No parsing is performed on the response string, nor does |ftp_raw| determine if the command succeeded. *ftp_rawlist()* > array ftp_rawlist(resource ftp_stream, string directory [, bool recursive]) |ftp_rawlist| executes the FTP LIST command, and returns the result as an array. Each array element corresponds to one line of text. The output is not parsed in any way. The system type identifier returned by |ftp_systype| can be used to determine how the results should be interpreted. *ftp_rename()* > bool ftp_rename(resource ftp_stream, string from, string to) |ftp_rename| renames the file or directory that is currently named {from} to the new name {to}, using the FTP stream {ftp_stream}. *ftp_rmdir()* > bool ftp_rmdir(resource ftp_stream, string directory) Removes the specified {directory}. {directory} must be either an absolute or relative path to an empty directory. *ftp_set_option()* > bool ftp_set_option(resource ftp_stream, int option, mixed value) Returns TRUE if the option could be set; FALSE if not. A warning message will be thrown if the {option} is not supported or the passed {value} doesn't match the expected value for the given {option}. *ftp_site()* > bool ftp_site(resource ftp_stream, string cmd) |ftp_site| sends the command specified by {cmd} to the FTP server. SITE commands are not standardized, and vary from server to server. They are useful for handling such things as file permissions and group membership. *ftp_size()* > int ftp_size(resource ftp_stream, string remote_file) |ftp_size| returns the size of a {remote_file} in bytes. If an error occurs, or if the given file does not exist, or is a directory, -1 is returned. Not all servers support this feature. *ftp_ssl_connect()* > resource ftp_ssl_connect(string host [, int port [, int timeout]]) Returns a SSL-FTP stream on success or FALSE on error. *ftp_systype()* > string ftp_systype(resource ftp_stream) Returns the remote system type, or FALSE on error. ============================================================================== Funchand *php-funchand* *call_user_func_array()* > mixed call_user_func_array(callback function, array param_arr) Call a user defined function given by {function}, with the parameters in {param_arr}. For example: *call_user_func()* > mixed call_user_func(callback function [, mixed parameter]) Call a user defined function given by the {function} parameter. Take the following: *create_function()* > string create_function(string args, string code) Creates an anonymous function from the parameters passed, and returns a unique name for it. Usually the {args} will be passed as a single quote delimited string, and this is also recommended for the {code}. The reason for using single quoted strings, is to protect the variable names from parsing, otherwise, if you use double quotes there will be a need to escape the variable names, e.g. \$avar. *func_get_arg()* > mixed func_get_arg(int arg_num) Returns the argument which is at the {arg_num}'th offset into a user-defined function's argument list. Function arguments are counted starting from zero. |func_get_arg| will generate a warning if called from outside of a function definition. This function cannot be used directly as a function parameter. Instead, its result may be assigned to a variable, which can then be passed to the function. *func_get_args()* > array func_get_args() Returns an array in which each element is the corresponding member of the current user-defined function's argument list. |func_get_args| will generate a warning if called from outside of a function definition. This function cannot be used directly as a function parameter. Instead, its result may be assigned to a variable, which can then be passed to the function. *func_num_args()* > int func_num_args() Returns the number of arguments passed into the current user-defined function. |func_num_args| will generate a warning if called from outside of a user-defined function. This function cannot be used directly as a function parameter. Instead, its result may be assigned to a variable, which can then be passed to the function. *function_exists()* > bool function_exists(string function_name) Checks the list of defined functions, both built-in (internal) and user-defined, for {function_name}. Returns TRUE on success or FALSE on failure.; *get_defined_functions()* > array get_defined_functions() This function returns an multidimensional array containing a list of all defined functions, both built-in (internal) and user-defined. The internal functions will be accessible via $arr["internal"], and the user defined ones using $arr["user"] (see example below). *register_shutdown_function()* > void register_shutdown_function(callback function [, mixed parameter]) Registers the function named by {function} to be executed when script processing is complete. *register_tick_function()* > void register_tick_function(callback function [, mixed arg]) Registers the function named by {func} to be executed when a tick is called. Also, you may pass an array consisting of an object and a method as the {func}. *unregister_tick_function()* > void unregister_tick_function(string function_name) De-registers the function named by {function_name} so it is no longer executed when a tick is called. ============================================================================== Gettext *php-gettext* *bind_textdomain_codeset()* > string bind_textdomain_codeset(string domain, string codeset) With |bind_textdomain_codeset|, you can set in which encoding will be messages from {domain} returned by |gettext| and similar functions. *bindtextdomain()* > string bindtextdomain(string domain, string directory) The |bindtextdomain| function sets the path for a domain. It returns the full pathname for the domain currently being set. *dcgettext()* > string dcgettext(string domain, string message, int category) This function allows you to override the current domain for a single message lookup. It also allows you to specify a {category}. *dcngettext()* > string dcngettext(string domain, string msgid1, string msgid2, int n, int category) This function allows you to override the current domain for a single plural message lookup. It also allows you to specify a {category}. *dgettext()* > string dgettext(string domain, string message) The |dgettext| function allows you to override the current domain for a single message lookup. *dngettext()* > string dngettext(string domain, string msgid1, string msgid2, int n) The |dngettext| function allows you to override the current domain for a single plural message lookup. *gettext()* > string gettext(string message) This function returns a translated string if one is found in the translation table, or the submitted message if not found. You may use the underscore character '_' as an alias to this function. *ngettext()* > string ngettext(string msgid1, string msgid2, int n) |ngettext| returns correct plural form of message identified by {msgid1} and {msgid2} for count {n}. Some languages have more than one form for plural messages dependent on the count. *textdomain()* > string textdomain(string text_domain) This function sets the domain to search within when calls are made to |gettext|, usually the named after an application. The previous default domain is returned. Call it with NULL as parameter to get the current setting without changing it. ============================================================================== Gmp *php-gmp* *gmp_abs()* > resource gmp_abs(resource a) Returns absolute value of {a}. *gmp_add()* > resource gmp_add(resource a, resource b) Add two GMP numbers. The result will be a GMP number representing the sum of the arguments. *gmp_and()* > resource gmp_and(resource a, resource b) Calculates logical AND of two GMP numbers. *gmp_clrbit()* > void gmp_clrbit(int index) Clears (sets to 0) bit {index} in {a}. The index starts at 0. *gmp_cmp()* > int gmp_cmp(resource a, resource b) Returns a positive value if a > b, zero if a = b and a negative value if a < b. *gmp_com()* > resource gmp_com(resource a) Returns the one's complement of {a}. *gmp_div_q()* > resource gmp_div_q(resource a, resource b [, int round]) Divides {a} by {b} and returns the integer result. The result rounding is defined by the {round}, which can have the following values: {GMP_ROUND_ZERO}: The result is truncated towards 0. {GMP_ROUND_PLUSINF}: The result is rounded towards +infinity. {GMP_ROUND_MINUSINF}: The result is rounded towards -infinity. *gmp_div_qr()* > array gmp_div_qr(resource n, resource d [, int round]) The function divides {n} by {d} and returns array, with the first element being [n/d] (the integer result of the division) and the second being (n - [n/d] * d) (the remainder of the division). *gmp_div_r()* > resource gmp_div_r(resource n, resource d [, int round]) Calculates remainder of the integer division of {n} by {d}. The remainder has the sign of the {n} argument, if not zero. *gmp_div()* > void gmp_div() This function is an alias of |gmp_div_q|. *gmp_divexact()* > resource gmp_divexact(resource n, resource d) Divides {n} by {d}, using fast "exact division" algorithm. This function produces correct results only when it is known in advance that {d} divides {n}. *gmp_fact()* > resource gmp_fact(int a) Calculates factorial (a!) of {a}. *gmp_gcd()* > resource gmp_gcd(resource a, resource b) Calculate greatest common divisor of {a} and {b}. The result is always positive even if either of, or both, input operands are negative. *gmp_gcdext()* > array gmp_gcdext(resource a, resource b) Calculates g, s, and t, such that a*s + b*t = g = gcd(a,b), where gcd is the greatest common divisor. Returns an array with respective elements g, s and t. *gmp_hamdist()* > int gmp_hamdist(resource a, resource b) Returns the hamming distance between {a} and {b}. Both operands should be non-negative. *gmp_init()* > resource gmp_init(mixed number [, int base]) Creates a GMP number from an integer or string. String representation can be decimal or hexadecimal. In the latter case, the string should start with 0x. Optional parameter {base} is available since PHP 4.1.0. *gmp_intval()* > int gmp_intval(resource gmpnumber) This function allows to convert GMP number to integer. This function returns a useful result only if the number actually fits the PHP integer (i.e., signed long type). If you want just to print the GMP number, use |gmp_strval|. *gmp_invert()* > resource gmp_invert(resource a, resource b) Computes the inverse of {a} modulo {b}. Returns FALSE if an inverse does not exist. *gmp_jacobi()* > int gmp_jacobi(resource a, resource p) Computes Jacobi symbol of {a} and {p}. {p} should be odd and must be positive. *gmp_legendre()* > int gmp_legendre(resource a, resource p) Compute the Legendre symbol of {a} and {p}. {p} should be odd and must be positive. *gmp_mod()* > resource gmp_mod(resource n, resource d) Calculates {n} modulo {d}. The result is always non-negative, the sign of {d} is ignored. *gmp_mul()* > resource gmp_mul(resource a, resource b) Multiplies {a} by {b} and returns the result. *gmp_neg()* > resource gmp_neg(resource a) Returns -{a}. *gmp_or()* > resource gmp_or(resource a, resource b) Calculates logical inclusive OR of two GMP numbers. *gmp_perfect_square()* > bool gmp_perfect_square(resource a) Returns TRUE if {a} is a perfect square, FALSE otherwise. *gmp_popcount()* > int gmp_popcount(resource a) Return the population count of {a}. *gmp_pow()* > resource gmp_pow(resource base, int exp) Raise {base} into power {exp}. The case of 0^0 yields 1. {exp} cannot be negative. *gmp_powm()* > resource gmp_powm(resource base, resource exp, resource mod) Calculate ({base} raised into power {exp}) modulo {mod}. If {exp} is negative, result is undefined. *gmp_prob_prime()* > int gmp_prob_prime(resource a [, int reps]) If this function returns 0, {a} is definitely not prime. If it returns 1, then {a} is "probably" prime. If it returns 2, then {a} is surely prime. Reasonable values of {reps} vary from 5 to 10 (default being 10); a higher value lowers the probability for a non-prime to pass as a "probable" prime. *gmp_random()* > resource gmp_random(int limiter) Generate a random number. The number will be between zero and the number of bits per limb multiplied by {limiter}. If {limiter} is negative, negative numbers are generated. *gmp_scan0()* > int gmp_scan0(resource a, int start) Scans {a}, starting with bit {start}, towards more significant bits, until the first clear bit is found. Returns the index of the found bit. The index starts from 0. *gmp_scan1()* > int gmp_scan1(resource a, int start) Scans {a}, starting with bit {start}, towards more significant bits, until the first set bit is found. Returns the index of the found bit. If no set bit is found, -1 is returned. *gmp_setbit()* > void gmp_setbit(int index [, bool set_clear]) Sets bit {index} in {a}. {set_clear} defines if the bit is set to 0 or 1. By default the bit is set to 1. Index starts at 0. *gmp_sign()* > int gmp_sign(resource a) Returns 1 if {a} is positive, -1 if {a} is negative, and 0 if {a} is zero. *gmp_sqrt()* > resource gmp_sqrt(resource a) Calculates square root of {a} and returns the integer portion of the result. *gmp_sqrtrem()* > array gmp_sqrtrem(resource a) Returns array where first element is the integer square root of {a} (see also |gmp_sqrt|), and the second is the remainder (i.e., the difference between {a} and the first element squared). *gmp_strval()* > string gmp_strval(resource gmpnumber [, int base]) Convert GMP number to string representation in base {base}. The default base is 10. Allowed values for the base are from 2 to 36. *gmp_sub()* > resource gmp_sub(resource a, resource b) Subtracts {b} from {a} and returns the result. *gmp_xor()* > resource gmp_xor(resource a, resource b) Calculates logical exclusive OR (XOR) of two GMP numbers. ============================================================================== Http *php-http* *header()* > void header(string string [, bool replace [, int http_response_code]]) |header| is used to send raw HTTP headers. See the HTTP/1.1 specification for more information on HTTP headers. *headers_list()* > array headers_list() |headers_list| will return a numerically indexed array of headers to be sent to the browser / client. To determine whether or not these headers have been sent yet, use |headers_sent|. *headers_sent()* > bool headers_sent() |headers_sent| will return FALSE if no HTTP headers have already been sent or TRUE otherwise. If the optional {file} and {line} parameters are set, |headers_sent| will put the PHP source file name and line number where output started in the {file} and {line} variables. *setcookie()* > bool setcookie(string name [, string value [, int expire [, string path [, string domain [, bool secure]]]]]) |setcookie| defines a cookie to be sent along with the rest of the HTTP headers. Like other headers, cookies must be sent before any output from your script (this is a protocol restriction). This requires that you place calls to this function prior to any output, including and tags as well as any whitespace. If output exists prior to calling this function, |setcookie| will fail and return FALSE. If |setcookie| successfully runs, it will return TRUE. This does not indicate whether the user accepted the cookie. *setrawcookie()* > bool setrawcookie(string name [, string value [, int expire [, string path [, string domain [, bool secure]]]]]) |setrawcookie| is exactly the same as |setcookie| except that the cookie value will not be automatically urlencoded when sent to the browser. ============================================================================== Hw *php-hw* *hw_array2objrec()* > string hw_array2objrec(array object_array) Converts an {object_array} into an object record. Multiple attributes like 'Title' in different languages are treated properly. *hw_changeobject()* > void hw_changeobject(int link, int objid, array attributes) *hw_children()* > array hw_children(int connection, int objectID) Returns an array of object ids. Each id belongs to a child of the collection with ID {objectID}. The array contains all children both documents and collections. *hw_childrenobj()* > array hw_childrenobj(int connection, int objectID) Returns an array of object records. Each object record belongs to a child of the collection with ID {objectID}. The array contains all children both documents and collections. *hw_close()* > int hw_close(int connection) Returns FALSE if connection is not a valid connection index, otherwise TRUE. Closes down the connection to a Hyperwave server with the given connection index. *hw_connect()* > int hw_connect(string host, int port, string username, string password) Opens a connection to a Hyperwave server and returns a connection index on success, or FALSE if the connection could not be made. Each of the arguments should be a quoted string, except for the port number. The {username} and {password} arguments are optional and can be left out. In such a case no identification with the server will be done. It is similar to identify as user anonymous. This function returns a connection index that is needed by other Hyperwave functions. You can have multiple connections open at once. Keep in mind, that the password is not encrypted. *hw_connection_info()* > void hw_connection_info(int link) *hw_cp()* > int hw_cp(int connection, array object_id_array, int destination_id) Copies the objects with object ids as specified in the second parameter to the collection with the id destination id. *hw_deleteobject()* > int hw_deleteobject(int connection, int object_to_delete) Deletes the object with the given object id in the second parameter. It will delete all instances of the object. *hw_docbyanchor()* > int hw_docbyanchor(int connection, int anchorID) Returns an th object id of the document to which {anchorID} belongs. *hw_docbyanchorobj()* > string hw_docbyanchorobj(int connection, int anchorID) Returns an th object record of the document to which {anchorID} belongs. *hw_document_attributes()* > string hw_document_attributes(int hw_document) Returns the object record of the document. *hw_document_bodytag()* > string hw_document_bodytag(int hw_document [, string prefix]) Returns the BODY tag of the document. If the document is an HTML document the BODY tag should be printed before the document. *hw_document_content()* > string hw_document_content(int hw_document) Returns the content of the document. If the document is an HTML document the content is everything after the BODY tag. Information from the HEAD and BODY tag is in the stored in the object record. *hw_document_setcontent()* > string hw_document_setcontent(int hw_document, string content) Sets or replaces the content of the document. If the document is an HTML document the content is everything after the BODY tag. Information from the HEAD and BODY tag is in the stored in the object record. If you provide this information in the content of the document too, the Hyperwave server will change the object record accordingly when the document is inserted. Probably not a very good idea. If this functions fails the document will retain its old content. *hw_document_size()* > int hw_document_size(int hw_document) Returns the size in bytes of the document. *hw_dummy()* > string hw_dummy(int link, int id, int msgid) *hw_edittext()* > int hw_edittext(int connection, int hw_document) Uploads the text document to the server. The object record of the document may not be modified while the document is edited. This function will only works for pure text documents. It will not open a special data connection and therefore blocks the control connection during the transfer. *hw_error()* > int hw_error(int connection) Returns the last error number. If the return value is 0 no error has occurred. The error relates to the last command. *hw_errormsg()* > string hw_errormsg(int connection) Returns a string containing the last error message or 'No Error'. If FALSE is returned, this function failed. The message relates to the last command. *hw_free_document()* > int hw_free_document(int hw_document) Frees the memory occupied by the Hyperwave document. *hw_getanchors()* > array hw_getanchors(int connection, int objectID) Returns an array of object ids with anchors of the document with object ID {objectID}. *hw_getanchorsobj()* > array hw_getanchorsobj(int connection, int objectID) Returns an array of object records with anchors of the document with object ID {objectID}. *hw_getandlock()* > string hw_getandlock(int connection, int objectID) Returns the object record for the object with ID {objectID}. It will also lock the object, so other users cannot access it until it is unlocked. *hw_getchildcoll()* > array hw_getchildcoll(int connection, int objectID) Returns an array of object ids. Each object ID belongs to a child collection of the collection with ID {objectID}. The function will not return child documents. *hw_getchildcollobj()* > array hw_getchildcollobj(int connection, int objectID) Returns an array of object records. Each object records belongs to a child collection of the collection with ID {objectID}. The function will not return child documents. *hw_getchilddoccoll()* > array hw_getchilddoccoll(int connection, int objectID) Returns array of object ids for child documents of a collection. *hw_getchilddoccollobj()* > array hw_getchilddoccollobj(int connection, int objectID) Returns an array of object records for child documents of a collection. *hw_getobject()* > array hw_getobject(int connection, mixed objectID [, string query]) Returns the object record for the object with ID {objectID} if the second parameter is an integer. If the second parameter is an array of integer the function will return an array of object records. In such a case the last parameter is also evaluated which is a query string. *hw_getobjectbyquery()* > array hw_getobjectbyquery(int connection, string query, int max_hits) Searches for objects on the whole server and returns an array of object ids. The maximum number of matches is limited to {max_hits}. If {max_hits} is set to -1 the maximum number of matches is unlimited. *hw_getobjectbyquerycoll()* > array hw_getobjectbyquerycoll(int connection, int objectID, string query, int max_hits) Searches for objects in collection with ID {objectID} and returns an array of object ids. The maximum number of matches is limited to {max_hits}. If {max_hits} is set to -1 the maximum number of matches is unlimited. *hw_getobjectbyquerycollobj()* > array hw_getobjectbyquerycollobj(int connection, int objectID, string query, int max_hits) Searches for objects in collection with ID {objectID} and returns an array of object records. The maximum number of matches is limited to {max_hits}. If {max_hits} is set to -1 the maximum number of matches is unlimited. *hw_getobjectbyqueryobj()* > array hw_getobjectbyqueryobj(int connection, string query, int max_hits) Searches for objects on the whole server and returns an array of object records. The maximum number of matches is limited to {max_hits}. If {max_hits} is set to -1 the maximum number of matches is unlimited. *hw_getparents()* > array hw_getparents(int connection, int objectID) Returns an indexed array of object ids. Each object id belongs to a parent of the object with ID {objectID}. *hw_getparentsobj()* > array hw_getparentsobj(int connection, int objectID) Returns an indexed array of object records plus an associated array with statistical information about the object records. The associated array is the last entry of the returned array. Each object record belongs to a parent of the object with ID {objectID}. *hw_getrellink()* > string hw_getrellink(int link, int rootid, int sourceid, int destid) *hw_getremote()* > int hw_getremote(int connection, int objectID) Returns a remote document. Remote documents in Hyperwave notation are documents retrieved from an external source. Common remote documents are for example external web pages or queries in a database. In order to be able to access external sources through remote documents Hyperwave introduces the HGI (Hyperwave Gateway Interface) which is similar to the CGI. Currently, only ftp, http-servers and some databases can be accessed by the HGI. Calling |hw_getremote| returns the document from the external source. If you want to use this function you should be very familiar with HGIs. You should also consider to use PHP instead of Hyperwave to access external sources. Adding database support by a Hyperwave gateway should be more difficult than doing it in PHP. *hw_getremotechildren()* > int hw_getremotechildren(int connection, string object_record) Returns the children of a remote document. Children of a remote document are remote documents itself. This makes sense if a database query has to be narrowed and is explained in Hyperwave Programmers' Guide. If the number of children is 1 the function will return the document itself formated by the Hyperwave Gateway Interface (HGI). If the number of children is greater than 1 it will return an array of object record with each maybe the input value for another call to |hw_getremotechildren|. Those object records are virtual and do not exist in the Hyperwave server, therefore they do not have a valid object ID. How exactly such an object record looks like is up to the HGI. If you want to use this function you should be very familiar with HGIs. You should also consider to use PHP instead of Hyperwave to access external sources. Adding database support by a Hyperwave gateway should be more difficult than doing it in PHP. *hw_getsrcbydestobj()* > array hw_getsrcbydestobj(int connection, int objectID) Returns the object records of all anchors pointing to the object with ID {objectID}. The object can either be a document or an anchor of type destination. *hw_gettext()* > int hw_gettext(int connection, int objectID) Returns the document with object ID {objectID}. If the document has anchors which can be inserted, they will be inserted already. The optional parameter rootID/prefix can be a string or an integer. If it is an integer it determines how links are inserted into the document. The default is 0 and will result in links that are constructed from the name of the link's destination object. This is useful for web applications. If a link points to an object with name 'internet_movie' the HTML link will be . The actual location of the source and destination object in the document hierarchy is disregarded. You will have to set up your web browser, to rewrite that URL to for example '/my_script.php3/internet_movie'. 'my_script.php3' will have to evaluate $PATH_INFO and retrieve the document. All links will have the prefix '/my_script.php3/'. If you do not want this you can set the optional parameter rootID/prefix to any prefix which is used instead. Is this case it has to be a string. *hw_getusername()* > string hw_getusername(int connection) Returns the username of the connection. *hw_identify()* > int hw_identify(int link, string username, string password) Identifies as user with {username} and {password}. Identification is only valid for the current session. I do not thing this function will be needed very often. In most cases it will be easier to identify with the opening of the connection. *hw_incollections()* > array hw_incollections(int connection, array object_id_array, array collection_id_array, int return_collections) Checks whether a set of objects (documents or collections) specified by the {object_id_array} is part of the collections listed in {collection_id_array}. When the fourth parameter {return_collections} is 0, the subset of object ids that is part of the collections (i.e., the documents or collections that are children of one or more collections of collection ids or their subcollections, recursively) is returned as an array. When the fourth parameter is 1, however, the set of collections that have one or more objects of this subset as children are returned as an array. This option allows a client to, e.g., highlight the part of the collection hierarchy that contains the matches of a previous query, in a graphical overview. *hw_info()* > string hw_info(int connection) Returns information about the current connection. The returned string has the following format: , , , , , *hw_inscoll()* > int hw_inscoll(int connection, int objectID, array object_array) Inserts a new collection with attributes as in {object_array} into collection with object ID {objectID}. *hw_insdoc()* > int hw_insdoc(resource connection, int parentID, string object_record [, string text]) Inserts a new document with attributes as in {object_record} into collection with object ID {parentID}. This function inserts either an object record only or an object record and a pure ascii text in {text} if {text} is given. If you want to insert a general document of any kind use |hw_insertdocument| instead. *hw_insertanchors()* > string hw_insertanchors(int hwdoc, array anchorecs, array dest [, array urlprefixes]) *hw_insertdocument()* > int hw_insertdocument(int connection, int parent_id, int hw_document) Uploads a document into the collection with {parent_id}. The document has to be created before with |hw_new_document|. Make sure that the object record of the new document contains at least the attributes: Type, DocumentType, Title and Name. Possibly you also want to set the MimeType. The functions returns the object id of the new document or FALSE. *hw_insertobject()* > int hw_insertobject(int connection, string object_rec, string parameter) Inserts an object into the server. The object can be any valid hyperwave object. See the HG-CSP documentation for a detailed information on how the parameters have to be. *hw_mapid()* > int hw_mapid(int connection, int server_id, int object_id) Maps a global object id on any hyperwave server, even those you did not connect to with |hw_connect|, onto a virtual object id. This virtual object id can then be used as any other object id, e.g. to obtain the object record with |hw_getobject|. The server id is the first part of the global object id (GOid) of the object which is actually the IP number as an integer. *hw_modifyobject()* > int hw_modifyobject(int connection, int object_to_change, array remove, array add [, int mode]) This command allows to remove, add, or modify individual attributes of an object record. The object is specified by the Object ID {object_to_change}. The first array {remove} is a list of attributes to remove. The second array {add} is a list of attributes to add. In order to modify an attribute one will have to remove the old one and add a new one. |hw_modifyobject| will always remove the attributes before it adds attributes unless the value of the attribute to remove is not a string or array. *hw_mv()* > int hw_mv(int connection, array object_id_array, int source_id, int destination_id) Moves the objects with object ids as specified in the second parameter from the collection with id {source_id} to the collection with the id {destination_id}. If the destination id is 0 the objects will be unlinked from the source collection. If this is the last instance of that object it will be deleted. If you want to delete all instances at once, use |hw_deleteobject|. *hw_new_document()* > int hw_new_document(string object_record, string document_data, int document_size) Returns a new Hyperwave document with document data set to {document_data} and object record set to {object_record}. The length of the {document_data} has to passed in {document_size}This function does not insert the document into the Hyperwave server. *hw_objrec2array()* > array hw_objrec2array(string object_record [, array format]) Converts an {object_record} into an object array. The keys of the resulting array are the attributes names. Multi-value attributes like 'Title' in different languages form its own array. The keys of this array are the left part to the colon of the attribute value. This left part must be two characters long. Other multi-value attributes without a prefix form an indexed array. If the optional parameter is missing the attributes 'Title', 'Description' and 'Keyword' are treated as language attributes and the attributes 'Group', 'Parent' and 'HtmlAttr' as non-prefixed multi-value attributes. By passing an array holding the type for each attribute you can alter this behaviour. The array is an associated array with the attribute name as its key and the value being one of HW_ATTR_LANG or HW_ATTR_NONE. *hw_output_document()* > int hw_output_document(int hw_document) Prints the document without the BODY tag. *hw_pconnect()* > int hw_pconnect(string host, int port, string username, string password) Returns a connection index on success, or FALSE if the connection could not be made. Opens a persistent connection to a Hyperwave server. Each of the arguments should be a quoted string, except for the port number. The {username} and {password} arguments are optional and can be left out. In such a case no identification with the server will be done. It is similar to identify as user anonymous. This function returns a connection index that is needed by other Hyperwave functions. You can have multiple persistent connections open at once. *hw_pipedocument()* > int hw_pipedocument(int connection, int objectID [, array url_prefixes]) Returns the Hyperwave document with object ID {objectID}. If the document has anchors which can be inserted, they will have been inserted already. The document will be transferred via a special data connection which does not block the control connection. *hw_root()* > int hw_root() Returns the object ID of the hyperroot collection. Currently this is always 0. The child collection of the hyperroot is the root collection of the connected server. *hw_setlinkroot()* > void hw_setlinkroot(int link, int rootid) *hw_stat()* > string hw_stat(int link) *hw_unlock()* > int hw_unlock(int connection, int objectID) Unlocks a document, so other users regain access. *hw_who()* > int hw_who(int connection) Returns an array of users currently logged into the Hyperwave server. Each entry in this array is an array itself containing the elements id, name, system, onSinceDate, onSinceTime, TotalTime and self. 'self' is 1 if this entry belongs to the user who initiated the request. ============================================================================== Hwapi *php-hwapi* *hw_api_attribute()* > HW_API_Attribute hw_api_attribute( [string name [, string value]]) Creates a new instance of hw_api_attribute with the given name and value. *hwapi_hgcsp()* > HW_API hwapi_hgcsp(string hostname [, int port]) Opens a connection to the Hyperwave server on host {hostname}. The protocol used is HGCSP. If you do not pass a port number, 418 is used. *hw_api_content()* > HW_API_Content hw_api_content(string content, string mimetype) Creates a new content object from the string {content}. The mimetype is set to {mimetype}. *hw_api_object()* > hw_api_object hw_api_object(array parameter) ============================================================================== Ibase *php-ibase* *ibase_add_user()* > bool ibase_add_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]]) PHP 4 uses {server}, {dba_user_name} and {dba_user_password} instead of {service_handle} parameter. *ibase_affected_rows()* > int ibase_affected_rows( [resource link_identifier]) This function returns the number of rows that were affected by the previous query that was executed from within the transaction context specified by {link_identifier}. If {link_identifier} is a connection resource, its default transaction is used. *ibase_backup()* > mixed ibase_backup(resource service_handle, string source_db, string dest_file [, int options [, bool verbose]]) *ibase_blob_add()* > bool ibase_blob_add(resource blob_handle, string data) |ibase_blob_add| adds data into a blob created with |ibase_blob_create|. Returns TRUE on success or FALSE on failure.; *ibase_blob_cancel()* > bool ibase_blob_cancel(resource blob_handle) This function will discard a BLOB created by |ibase_create_blob| if it has not yet been closed by |ibase_blob_close|. Returns TRUE on success or FALSE on failure.; *ibase_blob_close()* > mixed ibase_blob_close(resource blob_handle) This function closes a BLOB that has either been opened for reading by |ibase_open_blob| or has been opened for writing by |ibase_create_blob|. If the BLOB was being read, this function returns TRUE on success, if the BLOB was being written to, this function returns a string containing the BLOB id that has been assigned to it by the database. On failure, this function returns FALSE. *ibase_blob_create()* > resource ibase_blob_create( [resource link_identifier]) |ibase_blob_create| creates a new BLOB for filling with data. It returns a BLOB handle for later use with |ibase_blob_add| or FALSE on failure. *ibase_blob_echo()* > bool ibase_blob_echo(resource link_identifier, string blob_id) This function opens a BLOB for reading and sends its contents directly to standard output (the browser, in most cases). Returns TRUE on success or FALSE on failure.; *ibase_blob_get()* > string ibase_blob_get(resource blob_handle, int len) This function returns at most {len} bytes from a BLOB that has been opened for reading by |ibase_blob_open|. Returns FALSE on failure. BLOB_VALUE); $blob_hndl = ibase_blob_open($data->BLOB_VALUE); echo ibase_blob_get($blob_hndl, $blob_data[0]); ?> ]]> Whilst this example doesn't do much more than a 'ibase_blob_echo($data->BLOB_VALUE)' would do, it does show you how to get information into a $variable to manipulate as you please. *ibase_blob_import()* > string ibase_blob_import(resource link_identifier, resource file_handle) This function creates a BLOB, reads an entire file into it, closes it and returns the assigned BLOB id. The file handle is a handle returned by |fopen|. Returns FALSE on failure. *ibase_blob_info()* > array ibase_blob_info(resource link_identifier, string blob_id) Returns an array containing information about a BLOB. The information returned consists of the length of the BLOB, the number of segments it contains, the size of the largest segment, and whether it is a stream BLOB or a segmented BLOB. *ibase_blob_open()* > resource ibase_blob_open(resource link_identifier, string blob_id) |ibase_blob_open| opens an existing BLOB for reading. It returns a BLOB handle for later use with |ibase_blob_get| or FALSE on failure. *ibase_close()* > bool ibase_close( [resource connection_id]) Closes the link to an InterBase database that's associated with a connection id returned from |ibase_connect|. If the connection id is omitted, the last opened link is assumed. Default transaction on link is committed, other transactions are rolled back. Returns TRUE on success or FALSE on failure.; *ibase_commit_ret()* > bool ibase_commit_ret( [resource link_or_trans_identifier]) If called without an argument, this function commits the default transaction of the default link. If the argument is a connection identifier, the default transaction of the corresponding connection will be committed. If the argument is a transaction identifier, the corresponding transaction will be committed. The transaction context will be retained, so statements executed from within this transaction will not be invalidated. Returns TRUE on success or FALSE on failure.; *ibase_commit()* > bool ibase_commit( [resource link_or_trans_identifier]) If called without an argument, this function commits the default transaction of the default link. If the argument is a connection identifier, the default transaction of the corresponding connection will be committed. If the argument is a transaction identifier, the corresponding transaction will be committed. Returns TRUE on success or FALSE on failure.; *ibase_connect()* > resource ibase_connect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]]) Establishes a connection to an InterBase server. The {database} argument has to be a valid path to database file on the server it resides on. If the server is not local, it must be prefixed with either 'hostname:' (TCP/IP), '//hostname/' (NetBEUI) or 'hostname@' (IPX/SPX), depending on the connection protocol used. {username} and {password} can also be specified with PHP configuration directives ibase.default_user and ibase.default_password. {charset} is the default character set for a database. {buffers} is the number of database buffers to allocate for the server-side cache. If 0 or omitted, server chooses its own default. {dialect} selects the default SQL dialect for any statement executed within a connection, and it defaults to the highest one supported by client libraries. *ibase_db_info()* > string ibase_db_info(resource service_handle, string db, int action [, int argument]) *ibase_delete_user()* > bool ibase_delete_user(resource service_handle, string user_name) PHP 4 uses {server}, {dba_user_name} and {dba_user_password} instead of {service_handle} parameter. *ibase_drop_db()* > bool ibase_drop_db( [resource connection]) This functions drops a database that was opened by either |ibase_connect| or |ibase_pconnect|. The database is closed and deleted from the server. Returns TRUE on success or FALSE on failure.; *ibase_errcode()* > int ibase_errcode() Returns the error code that resulted from the most recent InterBase function call. Returns FALSE if no error occurred. *ibase_errmsg()* > string ibase_errmsg() Returns the error message that resulted from the most recent InterBase function call. Returns FALSE if no error occurred. *ibase_execute()* > resource ibase_execute(resource query [, mixed bind_arg]) Execute a query prepared by |ibase_prepare|. If the query raises an error, returns FALSE. If it is successful and there is a (possibly empty) result set (such as with a SELECT query), returns a result identifier. If the query was successful and there were no results, returns TRUE. *ibase_fetch_assoc()* > array ibase_fetch_assoc(resource result [, int fetch_flag]) |ibase_fetch_assoc| returns an associative array that corresponds to the fetched row. Subsequent calls will return the next row in the result set, or FALSE if there are no more rows. *ibase_fetch_object()* > object ibase_fetch_object(resource result_id [, int fetch_flag]) Fetches a row as a pseudo-object from a {result_id} obtained either by |ibase_query| or |ibase_execute|. email . "\n"; } ibase_close($dbh); ?> ]]> *ibase_fetch_row()* > array ibase_fetch_row(resource result_identifier [, int fetch_flag]) Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. *ibase_field_info()* > array ibase_field_info(resource result, int field_number) Returns an array with information about a field after a select query has been run. The array is in the form of name, alias, relation, length, type. *ibase_free_event_handler()* > bool ibase_free_event_handler(resource event) This function causes the registered event handler specified by {event} to be cancelled. The callback function will no longer be called for the events it was registered to handle. Returns TRUE on success or FALSE on failure.; *ibase_free_query()* > bool ibase_free_query(resource query) Free a query prepared by |ibase_prepare|. Returns TRUE on success or FALSE on failure.; *ibase_free_result()* > bool ibase_free_result(resource result_identifier) Frees a result set that has been created by |ibase_query| or |ibase_execute|. Returns TRUE on success or FALSE on failure.; *ibase_gen_id()* > int ibase_gen_id(string generator [, int increment [, resource link_identifier]]) *ibase_maintain_db()* > bool ibase_maintain_db(resource service_handle, string db, int action [, int argument]) *ibase_modify_user()* > bool ibase_modify_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]]) PHP 4 uses {server}, {dba_user_name} and {dba_user_password} instead of {service_handle} parameter. *ibase_name_result()* > bool ibase_name_result(resource result, string name) This function assigns a name to a result set. This name can be used later in UPDATE|DELETE ... WHERE CURRENT OF {name} statements. Returns TRUE on success or FALSE on failure.; ]]> *ibase_num_fields()* > int ibase_num_fields(resource result_id) Returns an integer containing the number of fields in a result set. ]]> *ibase_num_params()* > int ibase_num_params(resource query) This function returns the number of parameters in the prepared query specified by {query}. This is the number of binding arguments that must be present when calling |ibase_execute|. *ibase_param_info()* > array ibase_param_info(resource query, int param_number) Returns an array with information about a parameter after a query has been prepared. The array is in the form of name, alias, relation, length, type. *ibase_pconnect()* > resource ibase_pconnect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]]) |ibase_pconnect| acts very much like |ibase_connect| with two major differences. First, when connecting, the function will first try to find a (persistent) link that's already opened with the same parameters. If one is found, an identifier for it will be returned instead of opening a new connection. Second, the connection to the InterBase server will not be closed when the execution of the script ends. Instead, the link will remain open for future use (|ibase_close| will not close links established by |ibase_pconnect|). This type of link is therefore called 'persistent'. *ibase_prepare()* > resource ibase_prepare(string query) Prepare a query for later binding of parameter placeholders and execution (via |ibase_execute|). *ibase_query()* > resource ibase_query( [resource link_identifier, string query [, int bind_args]]) Performs a query on an InterBase database. If the query raises an error, returns FALSE. If it is successful and there is a (possibly empty) result set (such as with a SELECT query), returns a result identifier. If the query was successful and there were no results, returns TRUE. *ibase_restore()* > mixed ibase_restore(resource service_handle, string source_file, string dest_db [, int options [, bool verbose]]) *ibase_rollback_ret()* > bool ibase_rollback_ret( [resource link_or_trans_identifier]) If called without an argument, this function rolls back the default transaction of the default link. If the argument is a connection identifier, the default transaction of the corresponding connection will be rolled back. If the argument is a transaction identifier, the corresponding transaction will be rolled back. The transaction context will be retained, so statements executed from within this transaction will not be invalidated. Returns TRUE on success or FALSE on failure.; *ibase_rollback()* > bool ibase_rollback( [resource link_or_trans_identifier]) If called without an argument, this function rolls back the default transaction of the default link. If the argument is a connection identifier, the default transaction of the corresponding connection will be rolled back. If the argument is a transaction identifier, the corresponding transaction will be rolled back. Returns TRUE on success or FALSE on failure.; *ibase_server_info()* > string ibase_server_info(resource service_handle, int action) *ibase_service_attach()* > resource ibase_service_attach(string host, string dba_username, string dba_password) *ibase_service_detach()* > bool ibase_service_detach(resource service_handle) *ibase_set_event_handler()* > resource ibase_set_event_handler(callback event_handler, string event_name1 [, string event_name2]) This function registers a PHP user function as event handler for the specified events. The callback is called with the event name and the link resource as arguments whenever one of the specified events is posted by the database. The callback must return FALSE if the event handler should be canceled. Any other return value is ignored. This function accepts up to 15 event arguments. *ibase_timefmt()* > int ibase_timefmt(string format [, int columntype]) Sets the format of timestamp, date or time type columns returned from queries. Internally, the columns are formatted by c-function strftime(), so refer to its documentation regarding to the format of the string. {columntype} is one of the constants IBASE_TIMESTAMP, IBASE_DATE and IBASE_TIME. If omitted, defaults to IBASE_TIMESTAMP for backwards compatibility. *ibase_trans()* > resource ibase_trans( [int trans_args [, resource link_identifier]]) Begins a transaction. *ibase_wait_event()* > string ibase_wait_event(string event_name1 [, string event_name2]) This function suspends execution of the script until one of the specified events is posted by the database. The name of the event that was posted is returned. This function accepts up to 15 event arguments. ============================================================================== Icap *php-icap* *icap_close()* > int icap_close(int icap_stream [, int flags]) Closes the given icap stream. *icap_create_calendar()* > string icap_create_calendar(int stream_id, string calendar) *icap_delete_calendar()* > string icap_delete_calendar(int stream_id, string calendar) *icap_delete_event()* > string icap_delete_event(int stream_id, int uid) |icap_delete_event| deletes the calendar event specified by the {uid}. *icap_fetch_event()* > int icap_fetch_event(int stream_id, int event_id [, int options]) |icap_fetch_event| fetches an event from the calendar stream specified by {event_id}. *icap_list_alarms()* > int icap_list_alarms(int stream_id, array date, array time) Returns an array of event ID's that has an alarm going off at the given datetime. *icap_list_events()* > array icap_list_events(int stream_id, int begin_date [, int end_date]) Returns an array of event ID's that are between the two given datetimes. *icap_open()* > resource icap_open(string calendar, string username, string password, string options) Returns an ICAP stream on success, FALSE on error. *icap_rename_calendar()* > string icap_rename_calendar(int stream_id, string old_name, string new_name) *icap_reopen()* > int icap_reopen(int stream_id, string calendar [, int options]) *icap_snooze()* > string icap_snooze(int stream_id, int uid) |icap_snooze| turns on an alarm for a calendar event specified by the {uid}. *icap_store_event()* > string icap_store_event(int stream_id, object event) |icap_store_event| Stores an event into an ICAP calendar. An event object consists of: int public - 1 if public, 0 if private; string category - Category string of the event. string title - Title string of the event. string description - Description string of the event. int alarm - Number of minutes before the event to send out an alarm. datetime start - datetime object of the start of the event. datetime end - datetime object of the end of the event. ============================================================================== Iconv *php-iconv* *iconv_get_encoding()* > mixed iconv_get_encoding( [string type]) |iconv_get_encoding| returns the current value of the internal configuration variable if successful, or FALSE on failure. *iconv_mime_decode_headers()* > array iconv_mime_decode_headers(string encoded_headers [, int mode [, string charset]]) Returns an associative array that holds a whole set of MIME header fields specified by {encoded_headers} on success, or FALSE if an error occurs during the decoding. *iconv_mime_decode()* > string iconv_mime_decode(string encoded_header [, int mode [, string charset]]) Returns a decoded MIME field on success, or FALSE if an error occurs during the decoding. *iconv_mime_encode()* > string iconv_mime_encode(string field_name, string field_value [, array preferences]) Composes and returns a string that represents a valid MIME header field, which looks like the following: In the above example, "Subject" is the field name and the portion that begins with "=?ISO-8859-1?..." is the field value. *iconv_set_encoding()* > bool iconv_set_encoding(string type, string charset) |iconv_set_encoding| changes the value of the internal configuration variable specified by {type} to {charset}. Returns TRUE on success or FALSE on failure.; *iconv_strlen()* > int iconv_strlen(string str [, string charset]) Returns the character count of {str}. *iconv_strpos()* > int iconv_strpos(string haystack, string needle [, int offset [, string charset]]) Returns the numeric position of the first occurrence of {needle} in {haystack}. *iconv_strrpos()* > string iconv_strrpos(string haystack, string needle [, string charset]) Returns the numeric position of the last occurrence of {needle} in {haystack}. *iconv_substr()* > string iconv_substr(string str, int offset [, int length [, string charset]]) Returns the portion of {str} specified by the {start} and {length} parameters. *iconv()* > string iconv(string in_charset, string out_charset, string str) Performs a character set conversion on the string {str} from {in_charset} to {out_charset}. Returns the converted string or FALSE on failure. *ob_iconv_handler()* > array ob_iconv_handler(string contents, int status) It converts the string encoded in {internal_encoding} to {output_encoding}. ============================================================================== Id3 *php-id3* *id3_get_genre_id()* > int id3_get_genre_id(string genre) |id3_get_genre_id| returns the id for a genre. If the specified genre is not available in the genre list, |id3_get_genre_id| will return FALSE *id3_get_genre_list()* > array id3_get_genre_list() |id3_get_genre_list| returns an array containing all possible genres that may be stored in an ID3 tag. This list has been created by Eric Kemp and later extended by WinAmp. *id3_get_genre_name()* > string id3_get_genre_name(int genre_id) |id3_get_genre_name| returns the name for a genre id. *id3_get_tag()* > array id3_get_tag(string filename [, int version]) |id3_get_tag| is used to get all information stored in the id3 tag of the specified file. *id3_get_version()* > int id3_get_version(string filename) |id3_get_version| retrieves the version(s) of the ID3 tag(s) in the MP3 file. As a tag can contain ID3 v1.x and v2.x tags, the return value of this function should be bitwise compared with the predefined constants ID3_V1_0, ID3_V1_1 and ID3_V2. *id3_remove_tag()* > bool id3_remove_tag(string filename [, int version]) |id3_remove_tag| is used to remove the information stored of an ID3 tag. If no tag has been present, it will return FALSE and leave the file as it was. *id3_set_tag()* > bool id3_set_tag(string filename, array tag [, int version]) |id3_set_tag| is used to change the information stored of an ID3 tag. If no tag has been present, it will be added to the file. ============================================================================== Ifx *php-ifx* *ifx_affected_rows()* > int ifx_affected_rows(int result_id) {result_id} is a valid result id returned by |ifx_query| or |ifx_prepare|. *ifx_blobinfile_mode()* > void ifx_blobinfile_mode(int mode) Set the default blob mode for all select queries. Mode "0" means save Byte-Blobs in memory, and mode "1" means save Byte-Blobs in a file. *ifx_byteasvarchar()* > void ifx_byteasvarchar(int mode) Sets the default byte mode for all select-queries. Mode "0" will return a blob id, and mode "1" will return a varchar with text content. *ifx_close()* > int ifx_close( [int link_identifier]) Returns: always TRUE. *ifx_connect()* > int ifx_connect( [string database [, string userid [, string password]]]) Returns a connection identifier on success, or FALSE on error. *ifx_copy_blob()* > int ifx_copy_blob(int bid) Duplicates the given blob object. {bid} is the ID of the blob object. *ifx_create_blob()* > int ifx_create_blob(int type, int mode, string param) Creates an blob object. *ifx_create_char()* > int ifx_create_char(string param) Creates an char object. {param} should be the char content. *ifx_do()* > int ifx_do(int result_id) Returns TRUE on success or FALSE on failure.; *ifx_error()* > string ifx_error() The Informix error codes (SQLSTATE & SQLCODE) formatted as follows : *ifx_errormsg()* > string ifx_errormsg( [int errorcode]) Returns the Informix error message associated with the most recent Informix error, or, when the optional "{errorcode}" parameter is present, the error message corresponding to "{errorcode}". *ifx_fetch_row()* > array ifx_fetch_row(int result_id [, mixed position]) Returns an associative array that corresponds to the fetched row, or FALSE if there are no more rows. *ifx_fieldproperties()* > array ifx_fieldproperties(int result_id) Returns an associative array with fieldnames as key and the SQL fieldproperties as data for a query with {result_id}. Returns FALSE on error. *ifx_fieldtypes()* > array ifx_fieldtypes(int result_id) Returns an associative array with fieldnames as key and the SQL fieldtypes as data for query with {result_id}. Returns FALSE on error. *ifx_free_blob()* > int ifx_free_blob(int bid) Deletes the blobobject for the given blob object-id {bid}. Returns TRUE on success or FALSE on failure.; *ifx_free_char()* > int ifx_free_char(int bid) Deletes the charobject for the given char object-id {bid}. Returns TRUE on success or FALSE on failure.; *ifx_free_result()* > int ifx_free_result(int result_id) Releases resources for the query associated with {result_id}. Returns TRUE on success or FALSE on failure.; *ifx_get_blob()* > int ifx_get_blob(int bid) Returns the content of the blob object for the given blob object-id {bid}. *ifx_get_char()* > int ifx_get_char(int bid) Returns the content of the char object for the given char object-id {bid}. *ifx_getsqlca()* > array ifx_getsqlca(int result_id) {result_id} is a valid result id returned by |ifx_query| or |ifx_prepare|. *ifx_htmltbl_result()* > int ifx_htmltbl_result(int result_id [, string html_table_options]) Returns the number of rows fetched or FALSE on error. *ifx_nullformat()* > void ifx_nullformat(int mode) Sets the default return value of a NULL-value on a fetch row. Mode "0" returns "", and mode "1" returns "NULL". *ifx_num_fields()* > int ifx_num_fields(int result_id) Returns the number of columns in query for {result_id} or FALSE on error *ifx_num_rows()* > int ifx_num_rows(int result_id) Gives the number of rows fetched so far for a query with {result_id} after a |ifx_query| or |ifx_do| query. *ifx_pconnect()* > int ifx_pconnect( [string database [, string userid [, string password]]]) Returns: A positive Informix persistent link identifier on success, or FALSE on error *ifx_prepare()* > int ifx_prepare(string query, int conn_id [, int cursor_def, mixed blobidarray]) Returns an integer {result_id} for use by |ifx_do|. Sets {affected_rows} for retrieval by the |ifx_affected_rows| function. *ifx_query()* > int ifx_query(string query, int link_identifier [, int cursor_type [, mixed blobidarray]]) Returns a positive Informix result identifier on success, or FALSE on error. *ifx_textasvarchar()* > void ifx_textasvarchar(int mode) Sets the default text mode for all select-queries. Mode "0" will return a blob id, and mode "1" will return a varchar with text content. *ifx_update_blob()* > bool ifx_update_blob(int bid, string content) Updates the content of the blob object for the given blob object {bid}. {content} is a string with new data. Returns TRUE on success or FALSE on failure.; *ifx_update_char()* > int ifx_update_char(int bid, string content) Updates the content of the char object for the given char object {bid}. {content} is a string with new data. Returns TRUE on success or FALSE on failure.; *ifxus_close_slob()* > int ifxus_close_slob(int bid) Deletes the slob object on the given slob object-id {bid}. Returns TRUE on success or FALSE on failure.; *ifxus_create_slob()* > int ifxus_create_slob(int mode) Creates an slob object and opens it. Modes: 1 = LO_RDONLY, 2 = LO_WRONLY, 4 = LO_APPEND, 8 = LO_RDWR, 16 = LO_BUFFER, 32 = LO_NOBUFFER -> or-mask. You can also use constants named IFX_LO_RDONLY, IFX_LO_WRONLY etc. Return FALSE on error otherwise the new slob object-id. *ifxus_free_slob()* > int ifxus_free_slob(int bid) Deletes the slob object. {bid} is the Id of the slob object. Returns TRUE on success or FALSE on failure.; *ifxus_open_slob()* > int ifxus_open_slob(int bid, int mode) Opens an slob object. {bid} should be an existing slob id. Modes: 1 = LO_RDONLY, 2 = LO_WRONLY, 4 = LO_APPEND, 8 = LO_RDWR, 16 = LO_BUFFER, 32 = LO_NOBUFFER -> or-mask. Returns FALSE on error otherwise the new slob object-id. *ifxus_read_slob()* > int ifxus_read_slob(int bid, int nbytes) Reads nbytes of the slob object. {bid} is a existing slob id and {nbytes} is the number of bytes read. Return FALSE on error otherwise the string. *ifxus_seek_slob()* > int ifxus_seek_slob(int bid, int mode, int offset) Sets the current file or seek position of an open slob object. {bid} should be an existing slob id. Modes: 0 = LO_SEEK_SET, 1 = LO_SEEK_CUR, 2 = LO_SEEK_END and {offset} is an byte offset. Return FALSE on error otherwise the seek position. *ifxus_tell_slob()* > int ifxus_tell_slob(int bid) Returns the current file or seek position of an open slob object {bid} should be an existing slob id. Return FALSE on error otherwise the seek position. *ifxus_write_slob()* > int ifxus_write_slob(int bid, string content) Writes a string into the slob object. {bid} is an existing slob id and {content} the content to write. Return FALSE on error otherwise bytes written. ============================================================================== Iisfunc *php-iisfunc* *iis_add_server()* > int iis_add_server(string path, string comment, string server_ip, int port, string host_name, int rights, int start_server) *iis_get_dir_security()* > int iis_get_dir_security(int server_instance, string virtual_path) *iis_get_script_map()* > int iis_get_script_map(int server_instance, string virtual_path, string script_extension) *iis_get_server_by_comment()* > int iis_get_server_by_comment(string comment) *iis_get_server_by_path()* > int iis_get_server_by_path(string path) Each virtual server in IIS is associated with an instance number. |iis_get_server_by_path| Finds the instance number from the actual path to the root directory. *iis_get_server_rights()* > int iis_get_server_rights(int server_instance, string virtual_path) *iis_get_service_state()* > int iis_get_service_state(string service_id) *iis_remove_server()* > int iis_remove_server(int server_instance) *iis_set_app_settings()* > int iis_set_app_settings(int server_instance, string virtual_path, string application_scope) *iis_set_dir_security()* > int iis_set_dir_security(int server_instance, string virtual_path, int directory_flags) *iis_set_script_map()* > int iis_set_script_map(int server_instance, string virtual_path, string script_extension, string engine_path, int allow_scripting) *iis_set_server_rights()* > int iis_set_server_rights(int server_instance, string virtual_path, int directory_flags) *iis_start_server()* > int iis_start_server(int server_instance) *iis_start_service()* > int iis_start_service(string service_id) *iis_stop_server()* > int iis_stop_server(int server_instance) *iis_stop_service()* > int iis_stop_service(string service_id) ============================================================================== Image *php-image* *gd_info()* > array gd_info() Returns an associative array describing the version and capabilities of the installed GD library. *getimagesize()* > array getimagesize(string filename) The |getimagesize| function will determine the size of any GIF, JPG, PNG, SWF, SWC, PSD, TIFF, BMP, IFF, JP2, JPX, JB2, JPC, XBM, or WBMP image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag. *image_type_to_extension()* > string image_type_to_extension(int imagetype [, bool include_dot]) *image_type_to_mime_type()* > string image_type_to_mime_type(int imagetype) The |image_type_to_mime_type| function will determine the Mime-Type for an IMAGETYPE constant. image_type_to_mime_type (file) ]]> *image2wbmp()* > int image2wbmp(resource image [, string filename [, int threshold]]) |image2wbmp| creates the WBMP file in filename from the image {image}. The {image} argument is the return from |imagecreate|. *imagealphablending()* > bool imagealphablending(resource image, bool blendmode) |imagealphablending| allows for two different modes of drawing on truecolor images. In blending mode, the alpha channel component of the color supplied to all drawing function, such as |imagesetpixel| determines how much of the underlying color should be allowed to shine through. As a result, gd automatically blends the existing color at that point with the drawing color, and stores the result in the image. The resulting pixel is opaque. In non-blending mode, the drawing color is copied literally with its alpha channel information, replacing the destination pixel. Blending mode is not available when drawing on palette images. If {blendmode} is TRUE, then blending mode is enabled, otherwise disabled. Returns TRUE on success or FALSE on failure.; *imageantialias()* > bool imageantialias(resource im, bool on) See also |imagecreatetruecolor|. *imagearc()* > int imagearc(resource image, int cx, int cy, int w, int h, int s, int e, int color) |imagearc| draws a partial ellipse centered at {cx}, {cy} (top left is 0, 0) in the image represented by {image}. {W} and {h} specifies the ellipse's width and height respectively while the start and end points are specified in degrees indicated by the {s} and {e} arguments. 0° is located at the three-o'clock position, and the arc is drawn clockwise. *imagechar()* > int imagechar(resource image, int font, int x, int y, string c, int color) |imagechar| draws the first character of {c} in the image identified by {image} with its upper-left at {x},{y} (top left is 0, 0) with the color {color}. If {font} is 1, 2, 3, 4 or 5, a built-in font is used (with higher numbers corresponding to larger fonts). *imagecharup()* > int imagecharup(resource image, int font, int x, int y, string c, int color) |imagecharup| draws the character {c} vertically in the image identified by {image} at coordinates {x}, {y} (top left is 0, 0) with the color {color}. If {font} is 1, 2, 3, 4 or 5, a built-in font is used. *imagecolorallocate()* > int imagecolorallocate(resource image, int red, int green, int blue) |imagecolorallocate| returns a color identifier representing the color composed of the given RGB components. The {image} argument is the return from the |imagecreate| function. {red}, {green} and {blue} are the values of the red, green and blue component of the requested color respectively. These parameters are integers between 0 and 255 or hexadecimals between 0x00 and 0xFF. |imagecolorallocate| must be called to create each color that is to be used in the image represented by {image}. *imagecolorallocatealpha()* > int imagecolorallocatealpha(resource image, int red, int green, int blue, int alpha) |imagecolorallocatealpha| behaves identically to |imagecolorallocate| with the addition of the transparency parameter {alpha} which may have a value between 0 and 127. 0 indicates completely opaque while 127 indicates completely transparent. *imagecolorat()* > int imagecolorat(resource image, int x, int y) Returns the index of the color of the pixel at the specified location in the image specified by {image}. *imagecolorclosest()* > int imagecolorclosest(resource image, int red, int green, int blue) Returns the index of the color in the palette of the image which is "closest" to the specified RGB value. *imagecolorclosestalpha()* > int imagecolorclosestalpha(resource image, int red, int green, int blue, int alpha) Returns the index of the color in the palette of the image which is "closest" to the specified RGB value and {alpha} level. *imagecolorclosesthwb()* > int imagecolorclosesthwb(resource image, int red, int green, int blue) *imagecolordeallocate()* > int imagecolordeallocate(resource image, int color) The |imagecolordeallocate| function de-allocates a color previously allocated with |imagecolorallocate| or |imagecolorallocatealpha|. ]]> *imagecolorexact()* > int imagecolorexact(resource image, int red, int green, int blue) Returns the index of the specified color in the palette of the image. *imagecolorexactalpha()* > int imagecolorexactalpha(resource image, int red, int green, int blue, int alpha) Returns the index of the specified color+alpha in the palette of the image. *imagecolormatch()* > bool imagecolormatch(resource image1, resource image2) {image1} must be Truecolor, {image2} must be Palette, and both {image1} and {image2} must be the same size. *imagecolorresolve()* > int imagecolorresolve(resource image, int red, int green, int blue) This function is guaranteed to return a color index for a requested color, either the exact color or the closest possible alternative. *imagecolorresolvealpha()* > int imagecolorresolvealpha(resource image, int red, int green, int blue, int alpha) This function is guaranteed to return a color index for a requested color, either the exact color or the closest possible alternative. *imagecolorset()* > bool imagecolorset(resource image, int index, int red, int green, int blue) This sets the specified index in the palette to the specified color. This is useful for creating flood-fill-like effects in palleted images without the overhead of performing the actual flood-fill. *imagecolorsforindex()* > array imagecolorsforindex(resource image, int index) This returns an associative array with red, green, blue and alpha keys that contain the appropriate values for the specified color index. *imagecolorstotal()* > int imagecolorstotal(resource image) This returns the number of colors in the specified image's palette. *imagecolortransparent()* > int imagecolortransparent(resource image [, int color]) |imagecolortransparent| sets the transparent color in the {image} image to {color}. {image} is the image identifier returned by |imagecreate| and {color} is a color identifier returned by |imagecolorallocate|. *imagecopy()* > int imagecopy(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h) Copy a part of {src_im} onto {dst_im} starting at the x,y coordinates {src_x}, src_y with a width of {src_w} and a height of {src_h}. The portion defined will be copied onto the x,y coordinates, {dst_x} and {dst_y}. *imagecopymerge()* > int imagecopymerge(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct) Copy a part of {src_im} onto {dst_im} starting at the x,y coordinates {src_x}, src_y with a width of {src_w} and a height of {src_h}. The portion defined will be copied onto the x,y coordinates, {dst_x} and {dst_y}. The two images will be merged according to {pct} which can range from 0 to 100. When {pct} = 0, no action is taken, when 100 this function behaves identically to |imagecopy| for pallete images, while it implements alpha transparency for true colour images. *imagecopymergegray()* > int imagecopymergegray(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct) |imagecopymergegray| copy a part of {src_im} onto {dst_im} starting at the x,y coordinates {src_x}, src_y with a width of {src_w} and a height of {src_h}. The portion defined will be copied onto the x,y coordinates, {dst_x} and {dst_y}. The two images will be merged according to {pct} which can range from 0 to 100. When {pct} = 0, no action is taken, when 100 this function behaves identically to |imagecopy|. *imagecopyresampled()* > bool imagecopyresampled(resource dst_image, resource src_image, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h) |imagecopyresampled| copies a rectangular portion of one image to another image, smoothly interpolating pixel values so that, in particular, reducing the size of an image still retains a great deal of clarity. Returns TRUE on success or FALSE on failure.; *imagecopyresized()* > int imagecopyresized(resource dst_image, resource src_image, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h) |imagecopyresized| copies a rectangular portion of one image to another image. {dst_image} is the destination image, {src_image} is the source image identifier. If the source and destination coordinates and width and heights differ, appropriate stretching or shrinking of the image fragment will be performed. The coordinates refer to the upper left corner. This function can be used to copy regions within the same image (if {dst_image} is the same as {src_image}) but if the regions overlap the results will be unpredictable. *imagecreate()* > resource imagecreate(int x_size, int y_size) |imagecreate| returns an image identifier representing a blank image of size {x_size} by {y_size}. *imagecreatefromgd()* > resource imagecreatefromgd(string filename) *imagecreatefromgd2()* > resource imagecreatefromgd2(string filename) *imagecreatefromgd2part()* > resource imagecreatefromgd2part(string filename, int srcX, int srcY, int width, int height) *imagecreatefromgif()* > resource imagecreatefromgif(string filename) |imagecreatefromgif| returns an image identifier representing the image obtained from the given filename. *imagecreatefromjpeg()* > resource imagecreatefromjpeg(string filename) |imagecreatefromjpeg| returns an image identifier representing the image obtained from the given filename. *imagecreatefrompng()* > resource imagecreatefrompng(string filename) |imagecreatefrompng| returns an image identifier representing the image obtained from the given filename. *imagecreatefromstring()* > resource imagecreatefromstring(string image) |imagecreatefromstring| returns an image identifier representing the image obtained from the given string. These types will be automatically detected if your build of PHP supports them: JPEG, PNG, GIF, WBMP, and GD2. *imagecreatefromwbmp()* > resource imagecreatefromwbmp(string filename) |imagecreatefromwbmp| returns an image identifier representing the image obtained from the given filename. *imagecreatefromxbm()* > resource imagecreatefromxbm(string filename) |imagecreatefromxbm| returns an image identifier representing the image obtained from the given filename. *imagecreatefromxpm()* > resource imagecreatefromxpm(string filename) |imagecreatefromxpm| returns an image identifier representing the image obtained from the given filename. *imagecreatetruecolor()* > resource imagecreatetruecolor(int x_size, int y_size) |imagecreatetruecolor| returns an image identifier representing a black image of size {x_size} by {y_size}. *imagedashedline()* > int imagedashedline(resource image, int x1, int y1, int x2, int y2, int color) This function is deprecated. Use combination of |imagesetstyle| and |imageline| instead. *imagedestroy()* > bool imagedestroy(resource image) |imagedestroy| frees any memory associated with image {image}. {image} is the image identifier returned by the |imagecreate| function. *imageellipse()* > int imageellipse(resource image, int cx, int cy, int w, int h, int color) |imageellipse| draws an ellipse centered at {cx}, {cy} (top left is 0, 0) in the image represented by {image}. {W} and {h} specifies the ellipse's width and height respectively. The color of the ellipse is specified by {color}. *imagefill()* > int imagefill(resource image, int x, int y, int color) |imagefill| performs a flood fill starting at coordinate {x}, {y} (top left is 0, 0) with color {color} in the image {image}. *imagefilledarc()* > bool imagefilledarc(resource image, int cx, int cy, int w, int h, int s, int e, int color, int style) |imagefilledarc| draws a partial ellipse centered at {cx}, {cy} (top left is 0, 0) in the image represented by {image}. Returns TRUE on success or FALSE on failure.; {W} and {h} specifies the ellipse's width and height respectively while the start and end points are specified in degrees indicated by the {s} and {e} arguments. {style} is a bitwise OR of the following possibilities: IMG_ARC_PIE IMG_ARC_CHORD IMG_ARC_NOFILL IMG_ARC_EDGED IMG_ARC_PIE and IMG_ARC_CHORD are mutually exclusive; IMG_ARC_CHORD just connects the starting and ending angles with a straight line, while IMG_ARC_PIE produces a rounded edge. IMG_ARC_NOFILL indicates that the arc or chord should be outlined, not filled. IMG_ARC_EDGED, used together with IMG_ARC_NOFILL, indicates that the beginning and ending angles should be connected to the center - this is a good way to outline (rather than fill) a 'pie slice'. *imagefilledellipse()* > bool imagefilledellipse(resource image, int cx, int cy, int w, int h, int color) |imagefilledellipse| draws an ellipse centered at {cx}, {cy} (top left is 0, 0) in the image represented by {image}. {W} and {h} specifies the ellipse's width and height respectively. The ellipse is filled using {color}. Returns TRUE on success or FALSE on failure.; *imagefilledpolygon()* > int imagefilledpolygon(resource image, array points, int num_points, int color) |imagefilledpolygon| creates a filled polygon in image {image}. *imagefilledrectangle()* > int imagefilledrectangle(resource image, int x1, int y1, int x2, int y2, int color) |imagefilledrectangle| creates a filled rectangle of color {color} in image {image} starting at upper left coordinates {x1}, {y1} and ending at bottom right coordinates {x2}, {y2}. 0, 0 is the top left corner of the image. *imagefilltoborder()* > int imagefilltoborder(resource image, int x, int y, int border, int color) |imagefilltoborder| performs a flood fill whose border color is defined by {border}. The starting point for the fill is {x}, {y} (top left is 0, 0) and the region is filled with color {color}. *imagefilter()* > bool imagefilter(resource src_im, int filtertype [, int arg1 [, int arg2 [, int arg3]]]) |imagefilter| applies the filter {filtertype} to the image, using {arg1}, {arg2} and {arg3} where necessary. *imagefontheight()* > int imagefontheight(int font) Returns the pixel height of a character in the specified font. *imagefontwidth()* > int imagefontwidth(int font) Returns the pixel width of a character in font. *imageftbbox()* > array imageftbbox(float size, float angle, string font_file, string text [, array extrainfo]) This function requires GD 2.0.1 or later. *imagefttext()* > array imagefttext(resource image, float size, float angle, int x, int y, int col, string font_file, string text [, array extrainfo]) This function requires GD 2.0.1 or later. *imagegammacorrect()* > int imagegammacorrect(resource image, float inputgamma, float outputgamma) The |imagegammacorrect| function applies gamma correction to a gd image stream ({image}) given an input gamma, the parameter {inputgamma} and an output gamma, the parameter {outputgamma}. *imagegd()* > bool imagegd(resource image [, string filename]) *imagegd2()* > bool imagegd2(resource image [, string filename [, int chunk_size [, int type]]]) |imagegd2| outputs GD2 image to browser or file. *imagegif()* > bool imagegif(resource image [, string filename]) |imagegif| creates the GIF file in filename from the image {image}. The {image} argument is the return from the |imagecreate| function. *imageinterlace()* > int imageinterlace(resource image [, int interlace]) |imageinterlace| turns the interlace bit on or off. If interlace is 1 the image will be interlaced, and if interlace is 0 the interlace bit is turned off. *imageistruecolor()* > bool imageistruecolor(resource image) |imageistruecolor| finds whether the image {image} is a truecolor image. *imagejpeg()* > bool imagejpeg(resource image [, string filename [, int quality]]) |imagejpeg| creates the JPEG file in filename from the image {image}. The {image} argument is the return from the |imagecreate| function. *imagelayereffect()* > bool imagelayereffect(resource image, int effect) *imageline()* > int imageline(resource image, int x1, int y1, int x2, int y2, int color) |imageline| draws a line from {x1}, {y1} to {x2}, {y2} (top left is 0, 0) in image {image} of color {color}. *imageloadfont()* > int imageloadfont(string file) |imageloadfont| loads a user-defined bitmap font and returns an identifier for the font (that is always greater than 5, so it will not conflict with the built-in fonts). It returns FALSE in case of error. *imagepalettecopy()* > int imagepalettecopy(resource destination, resource source) |imagepalettecopy| copies the palette from the {source} image to the {destination} image. *imagepng()* > bool imagepng(resource image [, string filename]) The |imagepng| outputs a GD image stream ({image}) in PNG format to standard output (usually the browser) or, if a filename is given by the {filename} it outputs the image to the file. ]]> *imagepolygon()* > int imagepolygon(resource image, array points, int num_points, int color) |imagepolygon| creates a polygon in image id. {points} is a PHP array containing the polygon's vertices, i.e. points[0] = x0, points[1] = y0, points[2] = x1, points[3] = y1, etc. {num_points} is the total number of points (vertices). *imagepsbbox()* > array imagepsbbox(string text, int font, int size [, int space, int tightness, float angle]) {size} is expressed in pixels. *imagepscopyfont()* > int imagepscopyfont(int fontindex) Use this function if you need make further modifications to the font, for example extending/condensing, slanting it or changing its character encoding vector, but need to keep the original along as well. Note that the font you want to copy must be one obtained using |imagepsloadfont|, not a font that is itself a copied one. You can although make modifications to it before copying. *imagepsencodefont()* > int imagepsencodefont(int font_index, string encodingfile) Loads a character encoding vector from a file and changes the fonts encoding vector to it. As a PostScript fonts default vector lacks most of the character positions above 127, you'll definitely want to change this if you use an other language than English. The exact format of this file is described in T1libs documentation. T1lib comes with two ready-to-use files, IsoLatin1.enc and IsoLatin2.enc. *imagepsextendfont()* > bool imagepsextendfont(int font_index, float extend) Extend or condense a font ({font_index}), if the value of the {extend} parameter is less than one you will be condensing the font. *imagepsfreefont()* > void imagepsfreefont(int fontindex) |imagepsfreefont| frees memory used by a PostScript Type 1 font. *imagepsloadfont()* > int imagepsloadfont(string filename) In the case everything went right, a valid font index will be returned and can be used for further purposes. Otherwise the function returns FALSE and prints a message describing what went wrong, which you cannot read directly, while the output type is image. *imagepsslantfont()* > bool imagepsslantfont(int font_index, float slant) Slant a font given by the {font_index} parameter with a slant of the value of the {slant} parameter. *imagepstext()* > array imagepstext(resource image, string text, int font, int size, int foreground, int background, int x, int y [, int space, int tightness, float angle, int antialias_steps]) {foreground} is the color in which the text will be painted. {Background} is the color to which the text will try to fade in with antialiasing. No pixels with the color {background} are actually painted, so the background image does not need to be of solid color. *imagerectangle()* > int imagerectangle(resource image, int x1, int y1, int x2, int y2, int col) |imagerectangle| creates a rectangle of color col in image {image} starting at upper left coordinate x1, y1 and ending at bottom right coordinate x2, y2. 0, 0 is the top left corner of the image. *imagerotate()* > resource imagerotate(resource src_im, float angle, int bgd_color) Rotates the {src_im} image using a given {angle} in degrees. {bgd_color} specifies the color of the uncovered zone after the rotation. *imagesavealpha()* > bool imagesavealpha(resource image, bool saveflag) |imagesavealpha| sets the flag to attempt to save full alpha channel information (as opposed to single-color transparency) when saving PNG images. *imagesetbrush()* > int imagesetbrush(resource image, resource brush) |imagesetbrush| sets the brush image to be used by all line drawing functions (such as |imageline| and |imagepolygon|) when drawing with the special colors IMG_COLOR_BRUSHED or IMG_COLOR_STYLEDBRUSHED. *imagesetpixel()* > int imagesetpixel(resource image, int x, int y, int color) |imagesetpixel| draws a pixel at {x}, {y} (top left is 0, 0) in image {image} of color {color}. *imagesetstyle()* > bool imagesetstyle(resource image, array style) |imagesetstyle| sets the style to be used by all line drawing functions (such as |imageline| and |imagepolygon|) when drawing with the special color IMG_COLOR_STYLED or lines of images with color IMG_COLOR_STYLEDBRUSHED. Returns TRUE on success or FALSE on failure.; *imagesetthickness()* > bool imagesetthickness(resource image, int thickness) |imagesetthickness| sets the thickness of the lines drawn when drawing rectangles, polygons, ellipses etc. etc. to {thickness} pixels. Returns TRUE on success or FALSE on failure.; *imagesettile()* > int imagesettile(resource image, resource tile) |imagesettile| sets the tile image to be used by all region filling functions (such as |imagefill| and |imagefilledpolygon|) when filling with the special color IMG_COLOR_TILED. *imagestring()* > int imagestring(resource image, int font, int x, int y, string s, int col) |imagestring| draws the string {s} in the image identified by {image} with the upper-left corner at coordinates {x}, {y} (top left is 0, 0) in color {col}. If font is 1, 2, 3, 4 or 5, a built-in font is used. *imagestringup()* > int imagestringup(resource image, int font, int x, int y, string s, int col) |imagestringup| draws the string {s} vertically in the image identified by {image} at coordinates {x}, {y} (top left is 0, 0) in color {col}. If font is 1, 2, 3, 4 or 5, a built-in font is used. *imagesx()* > int imagesx(resource image) |imagesx| returns the width of the image identified by {image}. *imagesy()* > int imagesy(resource image) |imagesy| returns the height of the image identified by {image}. *imagetruecolortopalette()* > void imagetruecolortopalette(resource image, bool dither, int ncolors) |imagetruecolortopalette| converts a truecolor image to a palette image. The code for this function was originally drawn from the Independent JPEG Group library code, which is excellent. The code has been modified to preserve as much alpha channel information as possible in the resulting palette, in addition to preserving colors as well as possible. This does not work as well as might be hoped. It is usually best to simply produce a truecolor output image instead, which guarantees the highest output quality. *imagettfbbox()* > array imagettfbbox(float size, float angle, string fontfile, string text) This function calculates and returns the bounding box in pixels for a TrueType text. {text} The string to be measured. {size} The font size in pixels. {fontfile} The name of the TrueType font file (can be a URL). Depending on which version of the GD library that PHP is using, it may attempt to search for files that do not begin with a leading '/' by appending '.ttf' to the filename and searching along a library-defined font path. {angle} Angle in degrees in which {text} will be measured. |imagettfbbox| returns an array with 8 elements representing four points making the bounding box of the text: 0 lower left corner, X position 1 lower left corner, Y position 2 lower right corner, X position 3 lower right corner, Y position 4 upper right corner, X position 5 upper right corner, Y position 6 upper left corner, X position 7 upper left corner, Y position The points are relative to the text regardless of the angle, so "upper left" means in the top left-hand corner seeing the text horizontally. *imagettftext()* > array imagettftext(resource image, float size, float angle, int x, int y, int color, string fontfile, string text) {image} The image resource. See |imagecreate|. {size} The font size. Depending on your version of GD, this should be specified as the pixel size (GD1) or point size (GD2). {angle} The angle in degrees, with 0 degrees being left-to-right reading text. Higher values represent a counter-clockwise rotation. For example, a value of 90 would result in bottom-to-top reading text. {x} The coordinates given by {x} and {y} will define the basepoint of the first character (roughly the lower-left corner of the character). This is different from the |imagestring|, where {x} and {y} define the upper-left corner of the first character. For example, "top left" is 0, 0. {y} The y-ordinate. This sets the position of the fonts baseline, not the very bottom of the character. {color} The color index. Using the negative of a color index has the effect of turning off antialiasing. See |imagecolorallocate|. {fontfile} The path to the TrueType font you wish to use. Depending on which version of the GD library that PHP is using, when {fontfile} does not begin with a leading / then .ttf will be appended to the filename and the library will attempt to search for that filename along a library-defined font path. When using versions of the GD library lower than 2.0.18, a "space" character, rather than a semicolon, was used to define alternate paths to the font files. Unintentional use of this feature will result in the warning message: Warning: Could not find/open font. {text} The text string. May include decimal numeric character references (of the form: €) to access characters in a font beyond position 127. If a character is used in the string which is not supported by the font, a hollow rectangle will replace the character. *imagetypes()* > int imagetypes() This function returns a bit-field corresponding to the image formats supported by the version of GD linked into PHP. The following bits are returned, IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP | IMG_XPM. To check for PNG support, for example, do this: |imagetypes| example ]]> *imagewbmp()* > bool imagewbmp(resource image [, string filename [, int foreground]]) |imagewbmp| creates the WBMP file in filename from the image {image}. The {image} argument is the return from the |imagecreate| function. *imagexbm()* > bool imagexbm(resource image, string filename [, int foreground]) *iptcembed()* > array iptcembed(string iptcdata, string jpeg_file_name [, int spool]) *iptcparse()* > array iptcparse(string iptcblock) This function parses a binary IPTC block into its single tags. It returns an array using the tagmarker as an index and the value as the value. It returns FALSE on error or if no IPTC data was found. See |getimagesize| for a sample. *jpeg2wbmp()* > int jpeg2wbmp(string jpegname, string wbmpname, int d_height, int d_width, int threshold) Converts the {jpegname} JPEG file to WBMP format, and saves it as {wbmpname}. With the {d_height} and {d_width} you specify the height and width of the destination image. *png2wbmp()* > int png2wbmp(string pngname, string wbmpname, int d_height, int d_width, int threshold) Converts the {pngname} PNG file to WBMP format, and saves it as {wbmpname}. With the {d_height} and {d_width} you specify the height and width of the destination image. ============================================================================== Imap *php-imap* *imap_8bit()* > string imap_8bit(string string) Convert an 8bit string to a quoted-printable string (according to RFC2045, section 6.7). *imap_alerts()* > array imap_alerts() This function returns an array of all of the IMAP alert messages generated since the last |imap_alerts| call, or the beginning of the page. When |imap_alerts| is called, the alert stack is subsequently cleared. The IMAP specification requires that these messages be passed to the user. *imap_append()* > bool imap_append(resource imap_stream, string mbox, string message [, string options]) |imap_append| appends a string message to the specified mailbox {mbox}. If the optional {options} is specified, writes the {options} to that mailbox also. *imap_base64()* > string imap_base64(string text) |imap_base64| function decodes BASE-64 encoded {text} (see RFC2045, Section 6.8). The decoded message is returned as a string. *imap_binary()* > string imap_binary(string string) Convert an 8bit string to a base64 string (according to RFC2045, Section 6.8). *imap_body()* > string imap_body(resource imap_stream, int msg_number [, int options]) |imap_body| returns the body of the message, numbered {msg_number} in the current mailbox. *imap_bodystruct()* > object imap_bodystruct(resource stream_id, int msg_no, string section) *imap_check()* > object imap_check(resource imap_stream) Returns information about the current mailbox. Returns FALSE on failure. *imap_clearflag_full()* > bool imap_clearflag_full(resource stream, string sequence, string flag [, string options]) This function causes a store to delete the specified {flag} to the flags set for the messages in the specified {sequence}. The flags which you can unset are "\\Seen", "\\Answered", "\\Flagged", "\\Deleted", and "\\Draft" (as defined by RFC2060). Returns TRUE on success or FALSE on failure.;. *imap_close()* > bool imap_close(resource imap_stream [, int flag]) Closes the imap stream. Takes an optional {flag} CL_EXPUNGE, which will silently expunge the mailbox before closing, removing all messages marked for deletion. *imap_createmailbox()* > bool imap_createmailbox(resource imap_stream, string mbox) |imap_createmailbox| creates a new mailbox specified by {mbox}. Names containing international characters should be encoded by |imap_utf7_encode| *imap_delete()* > bool imap_delete(int imap_stream, int msg_number [, int options]) Returns TRUE. *imap_deletemailbox()* > bool imap_deletemailbox(resource imap_stream, string mbox) |imap_deletemailbox| deletes the specified mailbox (see |imap_open| for the format of {mbox} names). *imap_errors()* > array imap_errors() This function returns an array of all of the IMAP error messages generated since the last |imap_errors| call, or the beginning of the page. When |imap_errors| is called, the error stack is subsequently cleared. *imap_expunge()* > bool imap_expunge(resource imap_stream) |imap_expunge| deletes all the messages marked for deletion by |imap_delete|, |imap_mail_move|, or |imap_setflag_full|. *imap_fetch_overview()* > array imap_fetch_overview(resource imap_stream, string sequence [, int options]) This function fetches mail headers for the given {sequence} and returns an overview of their contents. {sequence} will contain a sequence of message indices or UIDs, if {flags} contains FT_UID. The returned value is an array of objects describing one message header each: subject - the messages subject from - who sent it date - when was it sent message_id - Message-ID references - is a reference to this message id size - size in bytes uid - UID the message has in the mailbox msgno - message sequence number in the mailbox recent - this message is flagged as recent flagged - this message is flagged answered - this message is flagged as answered deleted - this message is flagged for deletion seen - this message is flagged as already read draft - this message is flagged as being a draft *imap_fetchbody()* > string imap_fetchbody(resource imap_stream, int msg_number, string part_number [, int options]) This function causes a fetch of a particular section of the body of the specified messages as a text string and returns that text string. The section specification is a string of integers delimited by period which index into a body part list as per the IMAP4 specification. Body parts are not decoded by this function. *imap_fetchheader()* > string imap_fetchheader(resource imap_stream, int msgno [, int options]) This function causes a fetch of the complete, unfiltered RFC2822 format header of the specified message as a text string and returns that text string. *imap_fetchstructure()* > object imap_fetchstructure(resource imap_stream, int msg_number [, int options]) This function fetches all the structured information for a given message. The optional {options} parameter only has a single option, {FT_UID}, which tells the function to treat the {msg_number} argument as a {UID}. The returned object includes the envelope, internal date, size, flags and body structure along with a similar object for each mime attachment. The structure of the returned objects is as follows: *imap_get_quota()* > array imap_get_quota(resource imap_stream, string quota_root) Returns an array with integer values limit and usage for the given mailbox. The value of limit represents the total amount of space allowed for this mailbox. The usage value represents the mailboxes current level of capacity. Will return FALSE in the case of failure. *imap_get_quotaroot()* > array imap_get_quotaroot(resource imap_stream, string quota_root) Returns an array of integer values pertaining to the specified user mailbox. All values contain a key based upon the resource name, and a corresponding array with the usage and limit values within. *imap_getacl()* > array imap_getacl(resource stream_id, string mailbox) This function is currently only available to users of the c-client2000 or greater library. *imap_getmailboxes()* > array imap_getmailboxes(resource imap_stream, string ref, string pattern) Returns an array of objects containing mailbox information. Each object has the attributes {name}, specifying the full name of the mailbox; {delimiter}, which is the hierarchy delimiter for the part of the hierarchy this mailbox is in; and {attributes}. {Attributes} is a bitmask that can be tested against: LATT_NOINFERIORS - This mailbox has no "children" (there are no mailboxes below this one). LATT_NOSELECT - This is only a container, not a mailbox - you cannot open it. LATT_MARKED - This mailbox is marked. Only used by UW-IMAPD. LATT_UNMARKED - This mailbox is not marked. Only used by UW-IMAPD. *imap_getsubscribed()* > array imap_getsubscribed(resource imap_stream, string ref, string pattern) This function is identical to |imap_getmailboxes|, except that it only returns mailboxes that the user is subscribed to. *imap_header()* > void imap_header() This function is an alias of |imap_headerinfo|. *imap_headerinfo()* > object imap_headerinfo(resource imap_stream, int msg_number [, int fromlength [, int subjectlength [, string defaulthost]]]) This function returns an object of various header elements. *imap_headers()* > array imap_headers(resource imap_stream) Returns an array of string formatted with header info. One element per mail message. *imap_last_error()* > string imap_last_error() This function returns the full text of the last IMAP error message that occurred on the current page. The error stack is untouched; calling |imap_last_error| subsequently, with no intervening errors, will return the same error. *imap_list()* > array imap_list(resource imap_stream, string ref, string pattern) Returns an array containing the names of the mailboxes. See |imap_getmailboxes| for a description of {ref} and {pattern}. *imap_listmailbox()* > void imap_listmailbox() This function is an alias of |imap_list|. *imap_listscan()* > array imap_listscan(resource imap_stream, string ref, string pattern, string content) Returns an array containing the names of the mailboxes that have {content} in the text of the mailbox. *imap_listsubscribed()* > void imap_listsubscribed() This function is an alias of |imap_lsub|. *imap_lsub()* > array imap_lsub(resource imap_stream, string ref, string pattern) Returns an array of all the mailboxes that you have subscribed. *imap_mail_compose()* > string imap_mail_compose(array envelope, array body) *imap_mail_copy()* > bool imap_mail_copy(resource imap_stream, string msglist, string mbox [, int options]) Copies mail messages specified by {msglist} to specified mailbox. Returns TRUE on success or FALSE on failure.;. *imap_mail_move()* > bool imap_mail_move(resource imap_stream, string msglist, string mbox [, int options]) Moves mail messages specified by {msglist} to specified mailbox {mbox}. Returns TRUE on success or FALSE on failure.;. *imap_mail()* > bool imap_mail(string to, string subject, string message [, string additional_headers [, string cc [, string bcc [, string rpath]]]]) This function allows sending of emails with correct handling of Cc and Bcc receivers. Returns TRUE on success or FALSE on failure.;. *imap_mailboxmsginfo()* > object imap_mailboxmsginfo(resource imap_stream) Returns information about the current mailbox. Returns FALSE on failure. *imap_mime_header_decode()* > array imap_mime_header_decode(string text) |imap_mime_header_decode| function decodes MIME message header extensions that are non ASCII text (see RFC2047) The decoded elements are returned in an array of objects, where each object has two properties, "charset" and "text". If the element hasn't been encoded, and in other words is in plain US-ASCII,the "charset" property of that element is set to "default". *imap_msgno()* > int imap_msgno(resource imap_stream, int uid) This function returns the message sequence number for the given {uid}. It is the inverse of |imap_uid|. *imap_num_msg()* > int imap_num_msg(resource imap_stream) Return the number of messages in the current mailbox. *imap_num_recent()* > int imap_num_recent(resource imap_stream) Returns the number of recent messages in the current mailbox. *imap_open()* > resource imap_open(string mailbox, string username, string password [, int options]) Returns an IMAP stream on success and FALSE on error. This function can also be used to open streams to POP3 and NNTP servers, but some functions and features are only available on IMAP servers. *imap_ping()* > bool imap_ping(resource imap_stream) Returns TRUE if the stream is still alive, FALSE otherwise. *imap_qprint()* > string imap_qprint(string string) Convert a quoted-printable string to an 8 bit string (according to RFC2045, section 6.7). *imap_renamemailbox()* > bool imap_renamemailbox(resource imap_stream, string old_mbox, string new_mbox) This function renames on old mailbox to new mailbox (see |imap_open| for the format of {mbox} names). *imap_reopen()* > bool imap_reopen(resource imap_stream, string mailbox [, string options]) This function reopens the specified stream to a new {mailbox} on an IMAP or NNTP server. *imap_rfc822_parse_adrlist()* > array imap_rfc822_parse_adrlist(string address, string default_host) This function parses the address string as defined in RFC2822 and for each address, returns an array of objects. The objects properties are: *imap_rfc822_parse_headers()* > object imap_rfc822_parse_headers(string headers [, string defaulthost]) This function returns an object of various header elements, similar to |imap_header|, except without the flags and other elements that come from the IMAP server. *imap_rfc822_write_address()* > string imap_rfc822_write_address(string mailbox, string host, string personal) Returns a properly formatted email address as defined in RFC2822 given the {mailbox}, {host}, and {personal} info. *imap_scanmailbox()* > void imap_scanmailbox() This function is an alias of |imap_listscan|. *imap_search()* > array imap_search(resource imap_stream, string criteria [, int options [, string charset]]) This function performs a search on the mailbox currently opened in the given imap stream. {criteria} is a string, delimited by spaces, in which the following keywords are allowed. Any multi-word arguments (e.g. FROM "joey smith") must be quoted. ALL - return all messages matching the rest of the criteria ANSWERED - match messages with the \\ANSWERED flag set BCC "string" - match messages with "string" in the Bcc: field BEFORE "date" - match messages with Date: before "date" BODY "string" - match messages with "string" in the body of the message CC "string" - match messages with "string" in the Cc: field DELETED - match deleted messages FLAGGED - match messages with the \\FLAGGED (sometimes referred to as Important or Urgent) flag set FROM "string" - match messages with "string" in the From: field KEYWORD "string" - match messages with "string" as a keyword NEW - match new messages OLD - match old messages ON "date" - match messages with Date: matching "date" RECENT - match messages with the \\RECENT flag set SEEN - match messages that have been read (the \\SEEN flag is set) SINCE "date" - match messages with Date: after "date" SUBJECT "string" - match messages with "string" in the Subject: TEXT "string" - match messages with text "string" TO "string" - match messages with "string" in the To: UNANSWERED - match messages that have not been answered UNDELETED - match messages that are not deleted UNFLAGGED - match messages that are not flagged UNKEYWORD "string" - match messages that do not have the keyword "string" UNSEEN - match messages which have not been read yet *imap_set_quota()* > bool imap_set_quota(resource imap_stream, string quota_root, int quota_limit) Sets an upper limit quota on a per mailbox basis. This function requires the {imap_stream} to have been opened as the mail administrator account. It will not work if opened as any other user. *imap_setacl()* > bool imap_setacl(resource stream_id, string mailbox, string id, string rights) *imap_setflag_full()* > bool imap_setflag_full(resource stream, string sequence, string flag [, string options]) This function causes a store to add the specified {flag} to the flags set for the messages in the specified {sequence}. *imap_sort()* > array imap_sort(resource stream, int criteria, int reverse [, int options [, string search_criteria [, string charset]]]) Returns an array of message numbers sorted by the given parameters. *imap_status()* > object imap_status(resource imap_stream, string mailbox, int options) This function returns an object containing status information. Valid flags are: SA_MESSAGES - set status->messages to the number of messages in the mailbox SA_RECENT - set status->recent to the number of recent messages in the mailbox SA_UNSEEN - set status->unseen to the number of unseen (new) messages in the mailbox SA_UIDNEXT - set status->uidnext to the next uid to be used in the mailbox SA_UIDVALIDITY - set status->uidvalidity to a constant that changes when uids for the mailbox may no longer be valid SA_ALL - set all of the above *imap_subscribe()* > bool imap_subscribe(resource imap_stream, string mbox) Subscribe to a new mailbox. *imap_thread()* > array imap_thread(resource stream_id [, int options]) |imap_thread| returns an associative array containing a tree of messages threaded by REFERENCES, or FALSE on error. *imap_timeout()* > mixed imap_timeout(int timeout_type [, int timeout]) *imap_uid()* > int imap_uid(resource imap_stream, int msgno) This function returns the UID for the given message sequence number. An UID is an unique identifier that will not change over time while a message sequence number may change whenever the content of the mailbox changes. This function is the inverse of |imap_msgno|. *imap_undelete()* > bool imap_undelete(resource imap_stream, int msg_number [, int flags]) This function removes the deletion flag for a specified message, which is set by |imap_delete| or |imap_mail_move|. *imap_unsubscribe()* > bool imap_unsubscribe(string imap_stream, string mbox) Unsubscribe from a specified mailbox. *imap_utf7_decode()* > string imap_utf7_decode(string text) Decodes modified UTF-7 {text} into ISO-8859-1 string. *imap_utf7_encode()* > string imap_utf7_encode(string data) Converts {data} to modified UTF-7 text. Note that {data} is expected to be encoded in ISO-8859-1. *imap_utf8()* > string imap_utf8(string mime_encoded_text) Converts the given {mime_encoded_text} to UTF-8. MIME encoding method and the UTF-8 specification are described in RFC2047 and RFC2044 respectively. ============================================================================== Info *php-info* *assert_options()* > mixed assert_options(int what [, mixed value]) Using |assert_options| you may set the various |assert| control options or just query their current settings. *assert()* > int assert(mixed assertion) |assert| will check the given {assertion} and take appropriate action if its result is FALSE. *dl()* > int dl(string library) Loads the PHP extension given by the parameter {library}. The {library} parameter is only the filename of the extension to load which also depends on your platform. For example, the sockets extension (if compiled as a shared module, not the default!) would be called sockets.so on Unix platforms whereas it is called php_sockets.dll on the Windows platform. *extension_loaded()* > bool extension_loaded(string name) Returns TRUE if the extension identified by {name} is loaded, FALSE otherwise. *get_cfg_var()* > string get_cfg_var(string varname) Returns the current value of the PHP configuration variable specified by {varname}, or FALSE if an error occurs. *get_current_user()* > string get_current_user() Returns the name of the owner of the current PHP script. *get_defined_constants()* > array get_defined_constants( [mixed categorize]) This function returns the names and values of all the constants currently defined. This includes those created by extensions as well as those created with the |define| function. *get_extension_funcs()* > array get_extension_funcs(string module_name) This function returns the names of all the functions defined in the module indicated by {module_name}. *get_include_path()* > string get_include_path() Gets the current include_path configuration option value. *get_included_files()* > array get_included_files() Returns an array of the names of all files that have been included using |include|, |include_once|, |require| or |require_once|. *get_loaded_extensions()* > array get_loaded_extensions() This function returns the names of all the modules compiled and loaded in the PHP interpreter. *get_magic_quotes_gpc()* > int get_magic_quotes_gpc() Returns the current configuration setting of magic_quotes_gpc (0 for off, 1 for on). *get_magic_quotes_runtime()* > int get_magic_quotes_runtime() Returns the current active configuration setting of magic_quotes_runtime (0 for off, 1 for on). *get_required_files()* > void get_required_files() This function is an alias of |get_included_files|. *getenv()* > string getenv(string varname) Returns the value of the environment variable {varname}, or FALSE on an error. ]]> *getlastmod()* > int getlastmod() Returns the time of the last modification of the current page. The value returned is a Unix timestamp, suitable for feeding to |date|. Returns FALSE on error. *getmygid()* > int getmygid() Returns the group ID of the current script, or FALSE on error. *getmyinode()* > int getmyinode() Returns the current script's inode, or FALSE on error. *getmypid()* > int getmypid() Returns the current PHP process ID, or FALSE on error. *getmyuid()* > int getmyuid() Returns the user ID of the current script, or FALSE on error. *getopt()* > array getopt(string options [, array longopts]) Returns an associative array of option / argument pairs based on the options format specified in {options}, or FALSE on an error. *getrusage()* > array getrusage( [int who]) This is an interface to getrusage(2). It returns an associative array containing the data returned from the system call. If who is 1, getrusage will be called with RUSAGE_CHILDREN. *ini_alter()* > void ini_alter() This function is an alias of |ini_set|. *ini_get_all()* > array ini_get_all( [string extension]) Returns all the registered configuration options as an associative array. If the optional {extension} parameter is set, returns only options specific for that extension. *ini_get()* > string ini_get(string varname) Returns the value of the configuration option on success. Failure, such as querying for a non-existent value, will return an empty string. *ini_restore()* > void ini_restore(string varname) Restores a given configuration option to its original value. *ini_set()* > string ini_set(string varname, string newvalue) Sets the value of the given configuration option. Returns the old value on success, FALSE on failure. The configuration option will keep this new value during the script's execution, and will be restored at the script's ending. *main()* > void main() There is no function named |main| except in the PHP source. In PHP 4.3.0, a new type of error handling in the PHP source (php_error_docref) was introduced. One feature is to provide links to a manual page in PHP error messages when the PHP directives html_errors (on by default) and docref_root (on by default until PHP 4.3.2) are set. *memory_get_usage()* > int memory_get_usage() Returns the amount of memory, in bytes, that's currently being allocated to your PHP script. *php_ini_scanned_files()* > string php_ini_scanned_files() |php_ini_scanned_files| returns a comma-separated list of configuration files parsed after php.ini. These files are found in a directory defined by the --with-config-file-scan-dir option which is set during compilation. *php_logo_guid()* > string php_logo_guid() This function returns the ID which can be used to display the PHP logo using the built-in image. *php_sapi_name()* > string php_sapi_name() |php_sapi_name| returns a lowercase string which describes the type of interface between web server and PHP (Server API, SAPI). In CGI PHP, this string is "cgi", in mod_php for Apache, this string is "apache" and so on. *php_uname()* > string php_uname( [string mode]) |php_uname| returns a description of the operating system PHP is running on. For the name of just the operating system, consider using the PHP_OS constant, but be reminded this constant will contain the operating system PHP was built on. *phpcredits()* > void phpcredits( [int flag]) This function prints out the credits listing the PHP developers, modules, etc. It generates the appropriate HTML codes to insert the information in a page. {flag} is optional, and it defaults to CREDITS_ALL. To generate a custom credits page, you may want to use the {flag} parameter. For example to print the general credits, you will use somewhere in your code: *phpinfo()* > int phpinfo( [int what]) Outputs a large amount of information about the current state of PHP. This includes information about PHP compilation options and extensions, the PHP version, server information and environment (if compiled as a module), the PHP environment, OS version information, paths, master and local values of configuration options, HTTP headers, and the PHP License. *phpversion()* > string phpversion( [string extension]) Returns a string containing the version of the currently running PHP parser. If the optional {extension} parameter is specified, |phpversion| returns the version of that extension, or FALSE if there is no version information associated. *putenv()* > void putenv(string setting) Adds {setting} to the server environment. The environment variable will only exist for the duration of the current request. At the end of the request the environment is restored to its original state. *restore_include_path()* > void restore_include_path() Restores the include_path configuration option back to its original master value as set in php.ini *set_include_path()* > string set_include_path(string new_include_path) Sets the include_path configuration option for the duration of the script. Returns the old include_path on success or FALSE on failure. *set_magic_quotes_runtime()* > bool set_magic_quotes_runtime(int new_setting) Set the current active configuration setting of magic_quotes_runtime (0 for off, 1 for on). *set_time_limit()* > void set_time_limit(int seconds) Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. The default limit is 30 seconds or, if it exists, the max_execution_time value defined in the php.ini. If {seconds} is set to zero, no time limit is imposed. *version_compare()* > int version_compare(string version1, string version2 [, string operator]) |version_compare| compares two "PHP-standardized" version number strings. This is useful if you would like to write programs working only on some versions of PHP. *zend_logo_guid()* > string zend_logo_guid() This function returns the ID which can be used to display the Zend logo using the built-in image. *zend_version()* > string zend_version() Returns a string containing the version of the currently running Zend Engine. ============================================================================== Ingres-ii *php-ingres-ii* *ingres_autocommit()* > bool ingres_autocommit( [resource link]) |ingres_autocommit| is called before opening a transaction (before the first call to |ingres_query| or just after a call to |ingres_rollback| or |ingres_commit|) to switch the "autocommit" mode of the server on or off (when the script begins the autocommit mode is off). *ingres_close()* > bool ingres_close( [resource link]) Returns TRUE on success, or FALSE on failure. *ingres_commit()* > bool ingres_commit( [resource link]) |ingres_commit| commits the currently open transaction, making all changes made to the database permanent. *ingres_connect()* > resource ingres_connect( [string database [, string username [, string password]]]) Returns a Ingres II link resource on success, or FALSE on failure. *ingres_fetch_array()* > array ingres_fetch_array( [int result_type [, resource link]]) |ingres_fetch_array| Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. *ingres_fetch_object()* > object ingres_fetch_object( [int result_type [, resource link]]) |ingres_fetch_object| Returns an object that corresponds to the fetched row, or FALSE if there are no more rows. *ingres_fetch_row()* > array ingres_fetch_row( [resource link]) |ingres_fetch_row| returns an array that corresponds to the fetched row, or FALSE if there are no more rows. Each result column is stored in an array offset, starting at offset 1. *ingres_field_length()* > int ingres_field_length(int index [, resource link]) |ingres_field_length| returns the length of a field. This is the number of bytes used by the server to store the field. For detailed information, see the Ingres/OpenAPI User Guide - Appendix C. *ingres_field_name()* > string ingres_field_name(int index [, resource link]) |ingres_field_name| returns the name of a field in a query result, or FALSE on failure. *ingres_field_nullable()* > bool ingres_field_nullable(int index [, resource link]) |ingres_field_nullable| returns TRUE if the field can be set to the NULL value and FALSE if it can't. *ingres_field_precision()* > int ingres_field_precision(int index [, resource link]) |ingres_field_precision| returns the precision of a field. This value is used only for decimal, float and money SQL data types. For detailed information, see the Ingres/OpenAPI User Guide - Appendix C. *ingres_field_scale()* > int ingres_field_scale(int index [, resource link]) |ingres_field_scale| returns the scale of a field. This value is used only for the decimal SQL data type. For detailed information, see the Ingres/OpenAPI User Guide - Appendix C. *ingres_field_type()* > string ingres_field_type(int index [, resource link]) |ingres_field_type| returns the type of a field in a query result, or FALSE on failure. Examples of types returned are "IIAPI_BYTE_TYPE", "IIAPI_CHA_TYPE", "IIAPI_DTE_TYPE", "IIAPI_FLT_TYPE", "IIAPI_INT_TYPE", "IIAPI_VCH_TYPE". Some of these types can map to more than one SQL type depending on the length of the field (see |ingres_field_length|). For example "IIAPI_FLT_TYPE" can be a float4 or a float8. For detailed information, see the Ingres/OpenAPI User Guide - Appendix C. *ingres_num_fields()* > int ingres_num_fields( [resource link]) |ingres_num_fields| returns the number of fields in the results returned by the Ingres server after a call to |ingres_query| *ingres_num_rows()* > int ingres_num_rows( [resource link]) For delete, insert or update queries, |ingres_num_rows| returns the number of rows affected by the query. For other queries, |ingres_num_rows| returns the number of rows in the query's result. *ingres_pconnect()* > resource ingres_pconnect( [string database [, string username [, string password]]]) Returns a Ingres II link resource on success, or FALSE on failure. *ingres_query()* > bool ingres_query(string query [, resource link]) Returns TRUE on success, or FALSE on failure. *ingres_rollback()* > bool ingres_rollback( [resource link]) |ingres_rollback| rolls back the currently open transaction, actually canceling all changes made to the database during the transaction. ============================================================================== Ircg *php-ircg* *ircg_channel_mode()* > bool ircg_channel_mode(resource connection, string channel, string mode_spec, string nick) Set channel mode flags for {channel} on server connected to by {connection}. Mode flags are passed in {mode_spec} and are applied to the user specified by {nick}. *ircg_disconnect()* > bool ircg_disconnect(resource connection, string reason) |ircg_disconnect| will close a {connection} to a server previously established with |ircg_pconnect|. *ircg_eval_ecmascript_params()* > array ircg_eval_ecmascript_params(string params) See also |ircg_lookup_format_messages|. *ircg_fetch_error_msg()* > array ircg_fetch_error_msg(resource connection) |ircg_fetch_error_msg| returns the error from a failed connection. *ircg_get_username()* > string ircg_get_username(resource connection) Function |ircg_get_username| returns the username for the specified connection {connection}. Returns FALSE if {connection} died or is not valid. *ircg_html_encode()* > bool ircg_html_encode(string html_string [, bool auto_links [, bool conv_br]]) Encodes a HTML string {html_string} for output. This exposes the interface which the IRCG extension uses internally to reformat data coming from an IRC link. The function causes IRC color/font codes to be encoded in HTML and escapes certain entities. *ircg_ignore_add()* > bool ircg_ignore_add(resource connection, string nick) This function adds user {nick} to the ignore list of connection {connection}. Afterwards, IRCG will suppress all messages from this user through the associated connection. *ircg_ignore_del()* > bool ircg_ignore_del(resource connection, string nick) This function removes user {nick} from the IRCG ignore list associated with {connection}. *ircg_invite()* > bool ircg_invite(resource connection, string channel, string nickname) |ircg_invite| will send an invitation to the user {nickname}, prompting him to join {channel}. Returns TRUE on success or FALSE on failure.; *ircg_is_conn_alive()* > bool ircg_is_conn_alive(resource connection) |ircg_is_conn_alive| returns TRUE if {connection} is still alive and working or FALSE, if the connection has died for some reason. *ircg_join()* > bool ircg_join(resource connection, string channel [, string key]) Join the channel {channel} on the server connected to by {connection}. IRCG will optionally pass the room key {key}. *ircg_kick()* > bool ircg_kick(resource connection, string channel, string nick, string reason) Kick user {nick} from {channel} on server connected to by {connection}. {reason} should give a short message describing why this action was performed. *ircg_list()* > bool ircg_list(resource connection, string channel) |ircg_list| will request a list of users in the {channel}. The answer is sent to the output defined by |ircg_set_file| or |ircg_set_current|. Returns TRUE on success or FALSE on failure.; *ircg_lookup_format_messages()* > bool ircg_lookup_format_messages(string name) Check for the existence of the format message set {name}. Sets may be registered with |ircg_register_format_messages|, a default set named ircg is always available. Returns TRUE, if the set exists and FALSE otherwise. *ircg_lusers()* > bool ircg_lusers(resource connection) |ircg_lusers| will request a statistical breakdown of users on the network connected to on {connection}. The answer is sent to the output defined by |ircg_set_file| or |ircg_set_current|. Returns TRUE on success or FALSE on failure.; *ircg_msg()* > bool ircg_msg(resource connection, string recipient, string message [, bool suppress]) |ircg_msg| will send the message to a channel or user on the server connected to by {connection}. A {recipient} starting with # or & will send the {message} to a channel, anything else will be interpreted as a username. *ircg_names()* > bool ircg_names(int connection, string channel [, string target]) *ircg_nick()* > bool ircg_nick(resource connection, string nick) Change your nickname on the given {connection} to the one given in {nick}, if possible. *ircg_nickname_escape()* > string ircg_nickname_escape(string nick) Function |ircg_nickname_escape| returns an encoded nickname specified by {nick} which is IRC-compliant. *ircg_nickname_unescape()* > string ircg_nickname_unescape(string nick) Function |ircg_nickname_unescape| returns a decoded nickname, which is specified in {nick}. *ircg_notice()* > bool ircg_notice(resource connection, string recipient, string message) This function will send the {message} text to the user {nick} on the server connected to by {connection}. IRC servers and other software will not automatically generate replies to NOTICEs in contrast to other message types. *ircg_oper()* > bool ircg_oper(resource connection, string name, string password) |ircg_oper| will authenticate the logged in user on {connection} as an IRC operator. {name} and {password} must match a registered IRC operator account. Returns TRUE on success or FALSE on failure.; *ircg_part()* > bool ircg_part(resource connection, string channel) Leave the channel {channel} on the server connected to by {connection}. *ircg_pconnect()* > resource ircg_pconnect(string username [, string server_ip [, int server_port [, string msg_format [, array ctcp_messages [, array user_settings [, bool bailout_on_trivial]]]]]]) |ircg_pconnect| will try to establish a connection to an IRC server and return a connection resource handle for further use. *ircg_register_format_messages()* > bool ircg_register_format_messages(string name, array messages) With |ircg_register_format_messages| you can customize the way your IRC output looks like or which script functions are invoked on the client side. *ircg_set_current()* > bool ircg_set_current(resource connection) Select the current HTTP connection for output in this execution context. Every output sent from the server connected to by {connection} will be copied to standard output while using default formatting or a format message set specified by |ircg_register_format_messages|. *ircg_set_file()* > bool ircg_set_file(resource connection, string path) Function |ircg_set_file| specifies a logfile {path} in which all output from connection {connection} will be logged. Returns TRUE on success, otherwise FALSE. *ircg_set_on_die()* > bool ircg_set_on_die(resource connection, string host, int port, string data) In case of the termination of connection {connection} IRCG will connect to {host} at {port} (Note: host must be an IPv4 address, IRCG does not resolve host-names due to blocking issues), send {data} to the new host connection and will wait until the remote part closes connection. This can be used to trigger a PHP script for example. *ircg_topic()* > bool ircg_topic(resource connection, string channel, string new_topic) Change the topic for channel {channel} on the server connected to by {connection} to {new_topic}. *ircg_who()* > bool ircg_who(resource connection, string mask [, bool ops_only]) |ircg_who| will request a list of users whose nickname is matching {mask} on connected network {connection}. The optional parameter {ops_only} will shrink the list to server operators only. *ircg_whois()* > bool ircg_whois(resource connection, string nick) Sends a query to the connected server {connection} to ask for information about the specified user {nick}. ============================================================================== Java *php-java* *java_last_exception_clear()* > void java_last_exception_clear() See |java_last_exception_get| for an example. *java_last_exception_get()* > object java_last_exception_get() The following example demonstrates the usage of Java's exception handler from within PHP: Java exception handler push(1); // This should succeed $result = $stack->pop(); $ex = java_last_exception_get(); if (!$ex) { echo "$result\n"; } // This should fail (error suppressed by @) $result = @$stack->pop(); $ex = java_last_exception_get(); if ($ex) { echo $ex->toString(); } // Clear last exception java_last_exception_clear(); ?> ]]> ============================================================================== Ldap *php-ldap* *ldap_8859_to_t61()* > string ldap_8859_to_t61(string value) *ldap_add()* > bool ldap_add(resource link_identifier, string dn, array entry) Returns TRUE on success or FALSE on failure.; *ldap_bind()* > bool ldap_bind(resource link_identifier [, string bind_rdn [, string bind_password]]) Binds to the LDAP directory with specified RDN and password. Returns TRUE on success or FALSE on failure.; *ldap_close()* > bool ldap_close(resource link_identifier) Returns TRUE on success or FALSE on failure.; *ldap_compare()* > bool ldap_compare(resource link_identifier, string dn, string attribute, string value) Returns TRUE if {value} matches otherwise returns FALSE. Returns -1 on error. *ldap_connect()* > resource ldap_connect( [string hostname [, int port]]) Returns a positive LDAP link identifier on success, or FALSE on error. When OpenLDAP 2.x.x is used, |ldap_connect| will always return a resource as it does not actually connect but just initializes the connecting parameters. The actual connect happens with the next calls to ldap_* funcs, usually with |ldap_bind|. *ldap_count_entries()* > int ldap_count_entries(resource link_identifier, resource result_identifier) Returns number of entries in the result or FALSE on error. *ldap_delete()* > bool ldap_delete(resource link_identifier, string dn) Returns TRUE on success or FALSE on failure.; *ldap_dn2ufn()* > string ldap_dn2ufn(string dn) |ldap_dn2ufn| function is used to turn a DN, specified by {dn}, into a more user-friendly form, stripping off type names. *ldap_err2str()* > string ldap_err2str(int errno) Returns string error message. *ldap_errno()* > int ldap_errno(resource link_identifier) Return the LDAP error number of the last LDAP command for this link. *ldap_error()* > string ldap_error(resource link_identifier) Returns string error message. *ldap_explode_dn()* > array ldap_explode_dn(string dn, int with_attrib) |ldap_explode_dn| function is used to split the DN returned by |ldap_get_dn| and breaks it up into its component parts. Each part is known as Relative Distinguished Name, or RDN. |ldap_explode_dn| returns an array of all those components. {with_attrib} is used to request if the RDNs are returned with only values or their attributes as well. To get RDNs with the attributes (i.e. in attribute=value format) set {with_attrib} to 0 and to get only values set it to 1. *ldap_first_attribute()* > string ldap_first_attribute(resource link_identifier, resource result_entry_identifier) Returns the first attribute in the entry on success and FALSE on error. *ldap_first_entry()* > resource ldap_first_entry(resource link_identifier, resource result_identifier) Returns the result entry identifier for the first entry on success and FALSE on error. *ldap_first_reference()* > resource ldap_first_reference(resource link, resource result) *ldap_free_result()* > bool ldap_free_result(resource result_identifier) Returns TRUE on success or FALSE on failure.; *ldap_get_attributes()* > array ldap_get_attributes(resource link_identifier, resource result_entry_identifier) Returns a complete entry information in a multi-dimensional array on success and FALSE on error. *ldap_get_dn()* > string ldap_get_dn(resource link_identifier, resource result_entry_identifier) Returns the DN of the result entry and FALSE on error. *ldap_get_entries()* > array ldap_get_entries(resource link_identifier, resource result_identifier) Returns a complete result information in a multi-dimensional array on success and FALSE on error. *ldap_get_option()* > bool ldap_get_option(resource link_identifier, int option) Sets {retval} to the value of the specified option. Returns TRUE on success or FALSE on failure.; *ldap_get_values_len()* > array ldap_get_values_len(resource link_identifier, resource result_entry_identifier, string attribute) Returns an array of values for the attribute on success and FALSE on error. *ldap_get_values()* > array ldap_get_values(resource link_identifier, resource result_entry_identifier, string attribute) Returns an array of values for the attribute on success and FALSE on error. *ldap_list()* > resource ldap_list(resource link_identifier, string base_dn, string filter [, array attributes [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]]) Returns a search result identifier or FALSE on error. *ldap_mod_add()* > bool ldap_mod_add(resource link_identifier, string dn, array entry) Returns TRUE on success or FALSE on failure.; *ldap_mod_del()* > bool ldap_mod_del(resource link_identifier, string dn, array entry) Returns TRUE on success or FALSE on failure.; *ldap_mod_replace()* > bool ldap_mod_replace(resource link_identifier, string dn, array entry) Returns TRUE on success or FALSE on failure.; *ldap_modify()* > bool ldap_modify(resource link_identifier, string dn, array entry) Returns TRUE on success or FALSE on failure.; *ldap_next_attribute()* > string ldap_next_attribute(resource link_identifier, resource result_entry_identifier) Returns the next attribute in an entry on success and FALSE on error. *ldap_next_entry()* > resource ldap_next_entry(resource link_identifier, resource result_entry_identifier) Returns entry identifier for the next entry in the result whose entries are being read starting with |ldap_first_entry|. If there are no more entries in the result then it returns FALSE. *ldap_next_reference()* > resource ldap_next_reference(resource link, resource entry) *ldap_parse_reference()* > bool ldap_parse_reference(resource link, resource entry) *ldap_parse_result()* > bool ldap_parse_result(resource link, resource result) *ldap_read()* > resource ldap_read(resource link_identifier, string base_dn, string filter [, array attributes [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]]) Returns a search result identifier or FALSE on error. *ldap_rename()* > bool ldap_rename(resource link_identifier, string dn, string newrdn, string newparent, bool deleteoldrdn) The entry specified by {dn} is renamed/moved. The new RDN is specified by {newrdn} and the new parent/superior entry is specified by {newparent}. If the parameter {deleteoldrdn} is TRUE the old RDN value(s) is removed, else the old RDN value(s) is retained as non-distinguished values of the entry. Returns TRUE on success or FALSE on failure.; *ldap_sasl_bind()* > bool ldap_sasl_bind(resource link) *ldap_search()* > resource ldap_search(resource link_identifier, string base_dn, string filter [, array attributes [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]]) Returns a search result identifier or FALSE on error. *ldap_set_option()* > bool ldap_set_option(resource link_identifier, int option, mixed newval) Sets the value of the specified option to be {newval}. Returns TRUE on success or FALSE on failure.; on error. *ldap_set_rebind_proc()* > bool ldap_set_rebind_proc(resource link, callback callback) *ldap_sort()* > bool ldap_sort(resource link, resource result, string sortfilter) *ldap_start_tls()* > bool ldap_start_tls(resource link) *ldap_t61_to_8859()* > string ldap_t61_to_8859(string value) *ldap_unbind()* > bool ldap_unbind(resource link_identifier) Returns TRUE on success or FALSE on failure.; ============================================================================== Lzf *php-lzf* *lzf_compress()* > string lzf_compress(string arg) |lzf_compress| compresses data in {arg} parameter. *lzf_decompress()* > string lzf_decompress(string arg) |lzf_decompress| decompresses data from parameter {arg}. *lzf_optimized_for()* > int lzf_optimized_for() Returns 1 if LZF was optimized for speed, 0 for compression. ============================================================================== Mail *php-mail* *ezmlm_hash()* > int ezmlm_hash(string addr) |ezmlm_hash| calculates the hash value needed when keeping EZMLM mailing lists in a MySQL database. *mail()* > bool mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]]) |mail| automatically mails the message specified in {message} to the receiver specified in {to}. Multiple recipients can be specified by putting a comma between each address in {to}. Email with attachments and special types of content can be sent using this function. This is accomplished via MIME-encoding - for more information, see this Zend article or the PEAR Mime Classes. ============================================================================== Mailparse *php-mailparse* *mailparse_determine_best_xfer_encoding()* > int mailparse_determine_best_xfer_encoding(resource fp) *mailparse_msg_create()* > int mailparse_msg_create() *mailparse_msg_extract_part_file()* > string mailparse_msg_extract_part_file(resource rfc2045, string filename [, callback callbackfunc]) *mailparse_msg_extract_part()* > void mailparse_msg_extract_part(resource rfc2045, string msgbody [, callback callbackfunc]) *mailparse_msg_free()* > void mailparse_msg_free(resource rfc2045buf) *mailparse_msg_get_part_data()* > array mailparse_msg_get_part_data(resource rfc2045) *mailparse_msg_get_part()* > int mailparse_msg_get_part(resource rfc2045, string mimesection) *mailparse_msg_get_structure()* > array mailparse_msg_get_structure(resource rfc2045) *mailparse_msg_parse_file()* > resource mailparse_msg_parse_file(string filename) *mailparse_msg_parse()* > void mailparse_msg_parse(resource rfc2045buf, string data) *mailparse_rfc822_parse_addresses()* > array mailparse_rfc822_parse_addresses(string addresses) *mailparse_stream_encode()* > bool mailparse_stream_encode(resource sourcefp, resource destfp, string encoding) *mailparse_uudecode_all()* > array mailparse_uudecode_all(resource fp) ============================================================================== Math *php-math* *abs()* > number abs(mixed number) Returns the absolute value of {number}. If the argument {number} is of type float, the return type is also float, otherwise it is integer (as float usually has a bigger value range than integer). *acos()* > float acos(float arg) Returns the arc cosine of {arg} in radians. |acos| is the complementary function of |cos|, which means that a==cos(acos(a)) for every value of a that is within |acos|' range. *acosh()* > float acosh(float arg) Returns the inverse hyperbolic cosine of {arg}, i.e. the value whose hyperbolic cosine is {arg}. *asin()* > float asin(float arg) Returns the arc sine of {arg} in radians. |asin| is the complementary function of |sin|, which means that a==sin(asin(a)) for every value of a that is within |asin|'s range. *asinh()* > float asinh(float arg) Returns the inverse hyperbolic sine of {arg}, i.e. the value whose hyperbolic sine is {arg}. *atan()* > float atan(float arg) Returns the arc tangent of {arg} in radians. |atan| is the complementary function of |tan|, which means that a==tan(atan(a)) for every value of a that is within |atan|'s range. *atan2()* > float atan2(float y, float x) This function calculates the arc tangent of the two variables {x} and {y}. It is similar to calculating the arc tangent of {y} / {x}, except that the signs of both arguments are used to determine the quadrant of the result. *atanh()* > float atanh(float arg) Returns the inverse hyperbolic tangent of {arg}, i.e. the value whose hyperbolic tangent is {arg}. *base_convert()* > string base_convert(string number, int frombase, int tobase) Returns a string containing {number} represented in base {tobase}. The base in which {number} is given is specified in {frombase}. Both {frombase} and {tobase} have to be between 2 and 36, inclusive. Digits in numbers with a base higher than 10 will be represented with the letters a-z, with a meaning 10, b meaning 11 and z meaning 35. |base_convert| example ]]> Outputs: *bindec()* > number bindec(string binary_string) Returns the decimal equivalent of the binary number represented by the {binary_string} argument. *ceil()* > float ceil(float value) Returns the next highest integer value by rounding up {value} if necessary. The return value of |ceil| is still of type float as the value range of float is usually bigger than that of integer. *cos()* > float cos(float arg) |cos| returns the cosine of the {arg} parameter. The {arg} parameter is in radians. *cosh()* > float cosh(float arg) Returns the hyperbolic cosine of {arg}, defined as (exp(arg) + exp(-arg))/2. *decbin()* > string decbin(int number) Returns a string containing a binary representation of the given {number} argument. The largest number that can be converted is 4294967295 in decimal resulting to a string of 32 1's. *dechex()* > string dechex(int number) Returns a string containing a hexadecimal representation of the given {number} argument. The largest number that can be converted is 4294967295 in decimal resulting to "ffffffff". *decoct()* > string decoct(int number) Returns a string containing an octal representation of the given {number} argument. The largest number that can be converted is 4294967295 in decimal resulting to "37777777777". *deg2rad()* > float deg2rad(float number) This function converts {number} from degrees to the radian equivalent. *exp()* > float exp(float arg) Returns e raised to the power of {arg}. *expm1()* > float expm1(float number) |expm1| returns the equivalent to 'exp({number}) - 1' computed in a way that is accurate even if the value of {number} is near zero, a case where 'exp ({number}) - 1' would be inaccurate due to subtraction of two numbers that are nearly equal. *floor()* > float floor(float value) Returns the next lowest integer value by rounding down {value} if necessary. The return value of |floor| is still of type float because the value range of float is usually bigger than that of integer. *fmod()* > float fmod(float x, float y) Returns the floating point remainder of dividing the dividend ({x}) by the divisor ({y}). The reminder (r) is defined as: x = i * y + r, for some integer i. If {y} is non-zero, r has the same sign as {x} and a magnitude less than the magnitude of {y}. *getrandmax()* > int getrandmax() Returns the maximum value that can be returned by a call to |rand|. *hexdec()* > number hexdec(string hex_string) Returns the decimal equivalent of the hexadecimal number represented by the {hex_string} argument. |hexdec| converts a hexadecimal string to a decimal number. The largest number that can be converted is 7fffffff or 2147483647 in decimal. As of PHP 4.1.0, this function can also convert larger numbers. It returns float in that case. *hypot()* > float hypot(float x, float y) |hypot| returns the length of the hypotenuse of a right-angle triangle with sides of length {x} and {y}, or the distance of the point ({x}, {y}) from the origin. This is equivalent to sqrt(x*x + y*y). *is_finite()* > bool is_finite(float val) Returns TRUE if {val} is a legal finite number within the allowed range for a PHP float on this platform. *is_infinite()* > bool is_infinite(float val) Returns TRUE if {val} is infinite (positive or negative), like the result of log(0) or any value too big to fit into a float on this platform. *is_nan()* > bool is_nan(float val) Returns TRUE if {val} is 'not a number', like the result of acos(1.01). *lcg_value()* > float lcg_value() |lcg_value| returns a pseudo random number in the range of (0, 1). The function combines two CGs with periods of 2^31 - 85 and 2^31 - 249. The period of this function is equal to the product of both primes. *log()* > float log(float arg [, float base]) If the optional {base} parameter is specified, |log| returns logbase {arg}, otherwise |log| returns the natural logarithm of {arg}. *log10()* > float log10(float arg) Returns the base-10 logarithm of {arg}. *log1p()* > float log1p(float number) |log1p| returns log(1 + {number}) computed in a way that is accurante even when the value of {number} is close to zero. *max()* > mixed max(number arg1, number arg2) |max| returns the numerically highest of the parameter values. *min()* > mixed min(number arg1, number arg2) |min| returns the numerically lowest of the parameter values. *mt_getrandmax()* > int mt_getrandmax() Returns the maximum value that can be returned by a call to |mt_rand|. *mt_rand()* > int mt_rand( [int min, int max]) Many random number generators of older libcs have dubious or unknown characteristics and are slow. By default, PHP uses the libc random number generator with the |rand| function. The |mt_rand| function is a drop-in replacement for this. It uses a random number generator with known characteristics using the Mersenne Twister, which will produce random numbers four times faster than what the average libc rand() provides. *mt_srand()* > void mt_srand( [int seed]) Seeds the random number generator with {seed}. Since PHP 4.2.0, the {seed} becomes optional and defaults to a random value if omitted. *octdec()* > number octdec(string octal_string) Returns the decimal equivalent of the octal number represented by the {octal_string} argument. The largest number that can be converted is 17777777777 or 2147483647 in decimal. As of PHP 4.1.0, this function can also convert larger numbers. It returns float in that case. *pi()* > float pi() Returns an approximation of pi. The returned float has a precision based on the precision directive in php.ini, which defaults to 14. Also, you can use the M_PI constant which yields identical results to |pi|. *pow()* > number pow(number base, number exp) Returns {base} raised to the power of {exp}. If possible, this function will return an integer. *rad2deg()* > float rad2deg(float number) This function converts {number} from radian to degrees. *rand()* > int rand( [int min, int max]) If called without the optional {min}, {max} arguments |rand| returns a pseudo-random integer between 0 and RAND_MAX. If you want a random number between 5 and 15 (inclusive), for example, use rand (5, 15). *round()* > float round(float val [, int precision]) Returns the rounded value of {val} to specified {precision} (number of digits after the decimal point). {precision} can also be negative or zero (default). *sin()* > float sin(float arg) |sin| returns the sine of the {arg} parameter. The {arg} parameter is in radians. *sinh()* > float sinh(float arg) Returns the hyperbolic sine of {arg}, defined as (exp(arg) - exp(-arg))/2. *sqrt()* > float sqrt(float arg) Returns the square root of {arg}. *srand()* > void srand( [int seed]) Seeds the random number generator with {seed}. Since PHP 4.2.0, the {seed} becomes optional and defaults to a random value if omitted. *tan()* > float tan(float arg) |tan| returns the tangent of the {arg} parameter. The {arg} parameter is in radians. *tanh()* > float tanh(float arg) Returns the hyperbolic tangent of {arg}, defined as sinh(arg)/cosh(arg). ============================================================================== Mbstring *php-mbstring* *mb_convert_case()* > string mb_convert_case(string str, int mode [, string encoding]) |mb_convert_case| returns case folded version of {string} converted in the way specified by {mode}. *mb_convert_encoding()* > string mb_convert_encoding(string str) |mb_convert_encoding| converts character encoding of string {str} from from-encoding to to-encoding. *mb_convert_kana()* > string mb_convert_kana(string str [, string option [, string encoding]]) |mb_convert_kana| performs "han-kaku" - "zen-kaku" conversion for string {str}. It returns converted string. This function is only useful for Japanese. *mb_convert_variables()* > string mb_convert_variables() |mb_convert_variables| convert character encoding of variables {vars} in encoding from-encoding to encoding to-encoding. It returns character encoding before conversion for success, FALSE for failure. *mb_decode_mimeheader()* > string mb_decode_mimeheader(string str) |mb_decode_mimeheader| decodes encoded-word string {str} in MIME header. *mb_decode_numericentity()* > string mb_decode_numericentity(string str, array convmap [, string encoding]) Convert numeric string reference of string {str} in specified block to character. It returns converted string. *mb_detect_encoding()* > string mb_detect_encoding(string str [, mixed encoding_list [, bool strict]]) |mb_detect_encoding| detects character encoding in string {str}. It returns detected character encoding. *mb_detect_order()* > array mb_detect_order() |mb_detect_order| sets automatic character encoding detection order to encoding-list. It returns TRUE for success, FALSE for failure. *mb_encode_mimeheader()* > string mb_encode_mimeheader(string str [, string charset [, string linefeed]]) |mb_encode_mimeheader| encodes a given string {str} by the MIME header encoding scheme. Returns a converted version of the string represented in ASCII. *mb_encode_numericentity()* > string mb_encode_numericentity(string str, array convmap [, string encoding]) |mb_encode_numericentity| converts specified character codes in string {str} from HTML numeric character reference to character code. It returns converted string. *mb_ereg_match()* > bool mb_ereg_match(string pattern, string string [, string option]) |mb_ereg_match| returns TRUE if {string} matches regular expression {pattern}, FALSE if not. *mb_ereg_replace()* > string mb_ereg_replace(string pattern, string replacement, string string [, array option]) |mb_ereg_replace| scans {string} for matches to {pattern}, then replaces the matched text with {replacement} and returns the result string or FALSE on error. Multibyte character can be used in {pattern}. *mb_ereg_search_getpos()* > array mb_ereg_search_getpos() |mb_ereg_search_getpos| returns the point to start regular expression match for |mb_ereg_search|, |mb_ereg_search_pos|, |mb_ereg_search_regs|. The position is represented by bytes from the head of string. *mb_ereg_search_getregs()* > array mb_ereg_search_getregs() |mb_ereg_search_getregs| returns an array including the sub-string of matched part by last |mb_ereg_search|, |mb_ereg_search_pos|, |mb_ereg_search_regs|. If there are some maches, the first element will have the matched sub-string, the second element will have the first part grouped with brackets, the third element will have the second part grouped with brackets, and so on. It returns FALSE on error; *mb_ereg_search_init()* > array mb_ereg_search_init(string string [, string pattern [, string option]]) |mb_ereg_search_init| sets {string} and {pattern} for multibyte regular expression. These values are used for |mb_ereg_search|, |mb_ereg_search_pos|, |mb_ereg_search_regs|. It returns TRUE for success, FALSE for error. *mb_ereg_search_pos()* > array mb_ereg_search_pos( [string pattern [, string option]]) |mb_ereg_search_pos| returns an array including position of matched part for multibyte regular expression. The first element of the array will be the beginning of matched part, the second element will be length (bytes) of matched part. It returns FALSE on error. *mb_ereg_search_regs()* > array mb_ereg_search_regs( [string pattern [, string option]]) |mb_ereg_search_regs| executes the multibyte regular expression match, and if there are some matched part, it returns an array including substring of matched part as first element, the first grouped part with brackets as second element, the second grouped part as third element, and so on. It returns FALSE on error. *mb_ereg_search_setpos()* > array mb_ereg_search_setpos(int position) |mb_ereg_search_setpos| sets the starting point of match for |mb_ereg_search|. *mb_ereg_search()* > bool mb_ereg_search( [string pattern [, string option]]) |mb_ereg_search| returns TRUE if the multibyte string matches with the regular expression, FALSE for otherwise. The string for matching is set by |mb_ereg_search_init|. If {pattern} is not specified, the previous one is used. *mb_ereg()* > int mb_ereg(string pattern, string string [, array regs]) |mb_ereg| executes the regular expression match with multibyte support, and returns 1 if matches are found. If the optional third parameter was specified, the function returns the byte length of matched part, and the array {regs} will contain the substring of matched string. The functions returns 1 if it matches with the empty string. If no matches found or error happend, FALSE will be returned. *mb_eregi_replace()* > string mb_eregi_replace(string pattern, string replace, string string) |mb_ereg_replace| scans {string} for matches to {pattern}, then replaces the matched text with {replacement} and returns the result string or FALSE on error. Multibyte character can be used in {pattern}. The case will be ignored. *mb_eregi()* > int mb_eregi(string pattern, string string [, array regs]) |mb_eregi| executes the regular expression match with multibyte support, and returns 1 if matches are found. This function ignore case. If the optional third parameter was specified, the function returns the byte length of matched part, and the array {regs} will contain the substring of matched string. The functions returns 1 if it matches with the empty string. If no matches found or error happend, FALSE will be returned. *mb_get_info()* > string mb_get_info( [string type]) |mb_get_info| returns internal setting parameter of mbstring. *mb_http_input()* > string mb_http_input( [string type]) |mb_http_input| returns result of HTTP input character encoding detection. *mb_http_output()* > string mb_http_output( [string encoding]) If {encoding} is set, |mb_http_output| sets HTTP output character encoding to {encoding}. Output after this function is converted to {encoding}. |mb_http_output| returns TRUE for success and FALSE for failure. *mb_internal_encoding()* > mixed mb_internal_encoding( [string encoding]) |mb_internal_encoding| sets internal character encoding to {encoding} If parameter is omitted, it returns current internal encoding. *mb_language()* > string mb_language( [string language]) |mb_language| sets language. If {language} is omitted, it returns current language as string. *mb_list_encodings()* > array mb_list_encodings() |mb_list_encodings| returns an array with all supported encodings. *mb_output_handler()* > string mb_output_handler(string contents, int status) |mb_output_handler| is |ob_start| callback function. |mb_output_handler| converts characters in output buffer from internal character encoding to HTTP output character encoding. *mb_parse_str()* > bool mb_parse_str(string encoded_string) |mb_parse_str| parses GET/POST/COOKIE data and sets global variables. Since PHP does not provide raw POST/COOKIE data, it can only used for GET data for now. It preses URL encoded data, detects encoding, converts coding to internal encoding and set values to {result} array or global variables. *mb_preferred_mime_name()* > string mb_preferred_mime_name(string encoding) |mb_preferred_mime_name| returns MIME charset string for character encoding {encoding}. It returns charset string. *mb_regex_encoding()* > string mb_regex_encoding( [string encoding]) |mb_regex_encoding| returns the character encoding used by multibyte regex functions. *mb_regex_set_options()* > string mb_regex_set_options( [string options]) |mb_regex_set_options| sets the default options described by {options} for multibyte regex functions. *mb_send_mail()* > bool mb_send_mail(string to, string subject, string message [, string additional_headers [, string additional_parameter]]) |mb_send_mail| sends email. Headers and message are converted and encoded according to |mb_language| setting. |mb_send_mail| is wrapper function of |mail|. See |mail| for details. *mb_split()* > array mb_split(string pattern, string string [, int limit]) |mb_split| split multibyte {string} using regular expression {pattern} and returns the result as an array. *mb_strcut()* > string mb_strcut(string str, int start [, int length [, string encoding]]) |mb_strcut| returns the portion of {str} specified by the {start} and {length} parameters. *mb_strimwidth()* > string mb_strimwidth(string str, int start, int width [, string trimmarker [, string encoding]]) |mb_strimwidth| truncates string {str} to specified {width}. It returns truncated string. *mb_strlen()* > string mb_strlen(string str [, string encoding]) |mb_strlen| returns number of characters in string {str} having character encoding {encoding}. A multi-byte character is counted as 1. *mb_strpos()* > int mb_strpos(string haystack, string needle [, int offset [, string encoding]]) |mb_strpos| returns the numeric position of the first occurrence of {needle} in the {haystack} string. If {needle} is not found, it returns FALSE. *mb_strrpos()* > int mb_strrpos(string haystack, string needle [, string encoding]) |mb_strrpos| returns the numeric position of the last occurrence of {needle} in the {haystack} string. If {needle} is not found, it returns FALSE. *mb_strtolower()* > string mb_strtolower(string str [, string encoding]) |mb_strtolower| returns {str} with all alphabetic characters converted to lowercase. *mb_strtoupper()* > string mb_strtoupper(string str [, string encoding]) |mb_strtoupper| returns {str} with all alphabetic characters converted to uppercase. *mb_strwidth()* > int mb_strwidth(string str [, string encoding]) |mb_strwidth| returns width of string {str}. *mb_substitute_character()* > mixed mb_substitute_character( [mixed substrchar]) |mb_substitute_character| specifies substitution character when input character encoding is invalid or character code is not exist in output character encoding. Invalid characters may be substituted NULL(no output), string or integer value (Unicode character code value). *mb_substr_count()* > int mb_substr_count(string haystack, string needle [, string encoding]) |mb_substr_count| returns the number of times the {needle} substring occurs in the {haystack} string. *mb_substr()* > string mb_substr(string str, int start [, int length [, string encoding]]) |mb_substr| returns the portion of {str} specified by the {start} and {length} parameters. ============================================================================== Mcal *php-mcal* *mcal_append_event()* > int mcal_append_event(int mcal_stream) |mcal_append_event| stores the global event into an MCAL calendar for the stream {mcal_stream}. *mcal_close()* > int mcal_close(int mcal_stream [, int flags]) Closes the given mcal stream. *mcal_create_calendar()* > bool mcal_create_calendar(int stream, string calendar) Creates a new calendar named {calendar}. *mcal_date_compare()* > int mcal_date_compare(int a_year, int a_month, int a_day, int b_year, int b_month, int b_day) |mcal_date_compare| Compares the two given dates, returns <0, 0, >0 if ab respectively. *mcal_date_valid()* > int mcal_date_valid(int year, int month, int day) |mcal_date_valid| Returns TRUE if the given year, month and day is a valid date, FALSE if not. *mcal_day_of_week()* > int mcal_day_of_week(int year, int month, int day) |mcal_day_of_week| returns the day of the week of the given date. Possible return values range from 0 for Sunday through 6 for Saturday. *mcal_day_of_year()* > int mcal_day_of_year(int year, int month, int day) |mcal_day_of_year| returns the day of the year of the given date. *mcal_days_in_month()* > int mcal_days_in_month(int month, int leap_year) |mcal_days_in_month| returns the number of days in the month {month}, taking into account if the considered year is a leap year or not. *mcal_delete_calendar()* > string mcal_delete_calendar(int stream, string calendar) Deletes the calendar named {calendar}. *mcal_delete_event()* > int mcal_delete_event(int mcal_stream, int event_id) |mcal_delete_event| deletes the calendar event specified by the event_id. *mcal_event_add_attribute()* > void mcal_event_add_attribute(int stream, string attribute, string value) |mcal_event_add_attribute| adds an attribute to the stream's global event structure with the value given by "value". *mcal_event_init()* > int mcal_event_init(int stream) |mcal_event_init| initializes a streams global event structure. this effectively sets all elements of the structure to 0, or the default settings. *mcal_event_set_alarm()* > int mcal_event_set_alarm(int stream, int alarm) |mcal_event_set_alarm| sets the streams global event structure's alarm to the given minutes before the event. *mcal_event_set_category()* > int mcal_event_set_category(int stream, string category) |mcal_event_set_category| sets the streams global event structure's category to the given string. *mcal_event_set_class()* > int mcal_event_set_class(int stream, int class) |mcal_event_set_class| sets the streams global event structure's class to the given value. The class is either 1 for public, or 0 for private. *mcal_event_set_description()* > int mcal_event_set_description(int stream, string description) |mcal_event_set_description| sets the streams global event structure's description to the given string. *mcal_event_set_end()* > int mcal_event_set_end(int stream, int year, int month, int day [, int hour [, int min [, int sec]]]) |mcal_event_set_end| sets the streams global event structure's end date and time to the given values. *mcal_event_set_recur_daily()* > int mcal_event_set_recur_daily(int stream, int year, int month, int day, int interval) |mcal_event_set_recur_daily| sets the streams global event structure's recurrence to the given value to be reoccurring on a daily basis, ending at the given date. *mcal_event_set_recur_monthly_mday()* > int mcal_event_set_recur_monthly_mday(int stream, int year, int month, int day, int interval) |mcal_event_set_recur_monthly_mday| sets the streams global event structure's recurrence to the given value to be reoccurring on a monthly by month day basis, ending at the given date. *mcal_event_set_recur_monthly_wday()* > int mcal_event_set_recur_monthly_wday(int stream, int year, int month, int day, int interval) |mcal_event_set_recur_monthly_wday| sets the streams global event structure's recurrence to the given value to be reoccurring on a monthly by week basis, ending at the given date. *mcal_event_set_recur_none()* > int mcal_event_set_recur_none(int stream) |mcal_event_set_recur_none| sets the streams global event structure to not recur (event->recur_type is set to MCAL_RECUR_NONE). *mcal_event_set_recur_weekly()* > int mcal_event_set_recur_weekly(int stream, int year, int month, int day, int interval, int weekdays) |mcal_event_set_recur_weekly| sets the streams global event structure's recurrence to the given value to be reoccurring on a weekly basis, ending at the given date. *mcal_event_set_recur_yearly()* > int mcal_event_set_recur_yearly(int stream, int year, int month, int day, int interval) |mcal_event_set_recur_yearly| sets the streams global event structure's recurrence to the given value to be reoccurring on a yearly basis,ending at the given date. *mcal_event_set_start()* > int mcal_event_set_start(int stream, int year, int month, int day [, int hour [, int min [, int sec]]]) |mcal_event_set_start| sets the streams global event structure's start date and time to the given values. *mcal_event_set_title()* > int mcal_event_set_title(int stream, string title) |mcal_event_set_title| sets the streams global event structure's title to the given string. *mcal_expunge()* > int mcal_expunge(int stream) |mcal_expunge| deletes all events which have been previously marked for deletion. *mcal_fetch_current_stream_event()* > object mcal_fetch_current_stream_event(int stream) |mcal_fetch_current_stream_event| returns the current stream's event structure as an object containing: int id - ID of that event. int public - TRUE if the event if public, FALSE if it is private. string category - Category string of the event. string title - Title string of the event. string description - Description string of the event. int alarm - number of minutes before the event to send an alarm/reminder. object start - Object containing a datetime entry. object end - Object containing a datetime entry. int recur_type - recurrence type int recur_interval - recurrence interval datetime recur_enddate - recurrence end date int recur_data - recurrence data All datetime entries consist of an object that contains: int year - year int month - month int mday - day of month int hour - hour int min - minutes int sec - seconds int alarm - minutes before event to send an alarm *mcal_fetch_event()* > object mcal_fetch_event(int mcal_stream, int event_id [, int options]) |mcal_fetch_event| fetches an event from the calendar stream specified by {id}. *mcal_is_leap_year()* > int mcal_is_leap_year(int year) |mcal_is_leap_year| returns 1 if the given year is a leap year, 0 if not. *mcal_list_alarms()* > array mcal_list_alarms(int mcal_stream [, int begin_year, int begin_month, int begin_day, int end_year, int end_month, int end_day]) Returns an array of event ID's that has an alarm going off between the start and end dates, or if just a stream is given, uses the start and end dates in the global event structure. *mcal_list_events()* > array mcal_list_events(int mcal_stream [, int begin_year, int begin_month, int begin_day, int end_year, int end_month, int end_day]) Returns an array of ID's that are between the start and end dates, or if just a stream is given, uses the start and end dates in the global event structure. *mcal_next_recurrence()* > int mcal_next_recurrence(int stream, int weekstart, array next) |mcal_next_recurrence| returns an object filled with the next date the event occurs, on or after the supplied date. Returns empty date field if event does not occur or something is invalid. Uses weekstart to determine what day is considered the beginning of the week. *mcal_open()* > int mcal_open(string calendar, string username, string password [, int options]) Returns an MCAL stream on success, FALSE on error. *mcal_popen()* > int mcal_popen(string calendar, string username, string password [, int options]) Returns an MCAL stream on success, FALSE on error. *mcal_rename_calendar()* > string mcal_rename_calendar(int stream, string old_name, string new_name) Renames the calendar {old_name} to {new_name}. *mcal_reopen()* > int mcal_reopen(int mcal_stream, string calendar [, int options]) Reopens an MCAL stream to a new calendar. *mcal_snooze()* > bool mcal_snooze(int stream_id, int event_id) |mcal_snooze| turns off an alarm for a calendar event specified by the {stream_id} and {event_id}. *mcal_store_event()* > int mcal_store_event(int mcal_stream) |mcal_store_event| stores the modifications to the current global event for the given stream. *mcal_time_valid()* > int mcal_time_valid(int hour, int minutes, int seconds) |mcal_time_valid| Returns TRUE if the given hour, minutes and seconds is a valid time, FALSE if not. *mcal_week_of_year()* > int mcal_week_of_year(int day, int month, int year) |mcal_week_of_year| returns the week number of the given date. ============================================================================== Mcrypt *php-mcrypt* *mcrypt_cbc()* > string mcrypt_cbc(int cipher, string key, string data, int mode [, string iv]) The first prototype is when linked against libmcrypt 2.2.x, the second when linked against libmcrypt 2.4.x or higher. The {mode} should be either MCRYPT_ENCRYPT or MCRYPT_DECRYPT. *mcrypt_cfb()* > string mcrypt_cfb(int cipher, string key, string data, int mode, string iv) The first prototype is when linked against libmcrypt 2.2.x, the second when linked against libmcrypt 2.4.x or higher. The {mode} should be either MCRYPT_ENCRYPT or MCRYPT_DECRYPT. *mcrypt_create_iv()* > string mcrypt_create_iv(int size [, int source]) |mcrypt_create_iv| is used to create an IV. *mcrypt_decrypt()* > string mcrypt_decrypt(string cipher, string key, string data, string mode [, string iv]) |mcrypt_decrypt| decrypts the data and returns the unencrypted data. *mcrypt_ecb()* > string mcrypt_ecb(int cipher, string key, string data, int mode) The first prototype is when linked against libmcrypt 2.2.x, the second when linked against libmcrypt 2.4.x or higher. The {mode} should be either MCRYPT_ENCRYPT or MCRYPT_DECRYPT. *mcrypt_enc_get_algorithms_name()* > string mcrypt_enc_get_algorithms_name(resource td) This function returns the name of the algorithm. *mcrypt_enc_get_block_size()* > int mcrypt_enc_get_block_size(resource td) This function returns the block size of the algorithm specified by the encryption descriptor {td} in bytes. *mcrypt_enc_get_iv_size()* > int mcrypt_enc_get_iv_size(resource td) This function returns the size of the iv of the algorithm specified by the encryption descriptor in bytes. If it returns '0' then the IV is ignored in the algorithm. An IV is used in cbc, cfb and ofb modes, and in some algorithms in stream mode. *mcrypt_enc_get_key_size()* > int mcrypt_enc_get_key_size(resource td) This function returns the maximum supported key size of the algorithm specified by the encryption descriptor {td} in bytes. *mcrypt_enc_get_modes_name()* > string mcrypt_enc_get_modes_name(resource td) This function returns the name of the mode. *mcrypt_enc_get_supported_key_sizes()* > array mcrypt_enc_get_supported_key_sizes(resource td) Returns an array with the key sizes supported by the algorithm specified by the encryption descriptor. If it returns an empty array then all key sizes between 1 and |mcrypt_enc_get_key_size| are supported by the algorithm. *mcrypt_enc_is_block_algorithm_mode()* > bool mcrypt_enc_is_block_algorithm_mode(resource td) This function returns TRUE if the mode is for use with block algorithms, otherwise it returns FALSE. (e.g. FALSE for stream, and TRUE for cbc, cfb, ofb). *mcrypt_enc_is_block_algorithm()* > bool mcrypt_enc_is_block_algorithm(resource td) This function returns TRUE if the algorithm is a block algorithm, or FALSE if it is a stream algorithm. *mcrypt_enc_is_block_mode()* > bool mcrypt_enc_is_block_mode(resource td) This function returns TRUE if the mode outputs blocks of bytes or FALSE if it outputs bytes. (e.g. TRUE for cbc and ecb, and FALSE for cfb and stream). *mcrypt_enc_self_test()* > bool mcrypt_enc_self_test(resource td) This function runs the self test on the algorithm specified by the descriptor {td}. If the self test succeeds it returns FALSE. In case of an error, it returns TRUE. *mcrypt_encrypt()* > string mcrypt_encrypt(string cipher, string key, string data, string mode [, string iv]) |mcrypt_encrypt| encrypts the data and returns the encrypted data. *mcrypt_generic_deinit()* > bool mcrypt_generic_deinit(resource td) This function terminates encryption specified by the encryption descriptor ({td}). It clears all buffers, but does not close the module. You need to call |mcrypt_module_close| yourself. (But PHP does this for you at the end of the script.) Returns FALSE on error, or TRUE on success. *mcrypt_generic_end()* > bool mcrypt_generic_end(resource td) This function is deprecated, use |mcrypt_generic_deinit| instead. It can cause crashes when used with |mcrypt_module_close| due to multiple buffer frees. *mcrypt_generic_init()* > int mcrypt_generic_init(resource td, string key, string iv) The maximum length of the key should be the one obtained by calling |mcrypt_enc_get_key_size| and every value smaller than this is legal. The IV should normally have the size of the algorithms block size, but you must obtain the size by calling |mcrypt_enc_get_iv_size|. IV is ignored in ECB. IV MUST exist in CFB, CBC, STREAM, nOFB and OFB modes. It needs to be random and unique (but not secret). The same IV must be used for encryption/decryption. If you do not want to use it you should set it to zeros, but this is not recommended. *mcrypt_generic()* > string mcrypt_generic(resource td, string data) This function encrypts data. The data is padded with "\0" to make sure the length of the data is n * blocksize. This function returns the encrypted data. Note that the length of the returned string can in fact be longer then the input, due to the padding of the data. *mcrypt_get_block_size()* > int mcrypt_get_block_size(int cipher) The first prototype is when linked against libmcrypt 2.2.x, the second when linked against libmcrypt 2.4.x or 2.5.x. *mcrypt_get_cipher_name()* > string mcrypt_get_cipher_name(int cipher) |mcrypt_get_cipher_name| is used to get the name of the specified cipher. *mcrypt_get_iv_size()* > int mcrypt_get_iv_size(string cipher, string mode) |mcrypt_get_iv_size| returns the size of the Initialisation Vector (IV) in bytes. On error the function returns FALSE. If the IV is ignored in the specified cipher/mode combination zero is returned. *mcrypt_get_key_size()* > int mcrypt_get_key_size(int cipher) The first prototype is when linked against libmcrypt 2.2.x, the second when linked against libmcrypt 2.4.x or 2.5.x. *mcrypt_list_algorithms()* > array mcrypt_list_algorithms( [string lib_dir]) |mcrypt_list_algorithms| is used to get an array of all supported algorithms in the {lib_dir} parameter. *mcrypt_list_modes()* > array mcrypt_list_modes( [string lib_dir]) |mcrypt_list_modes| is used to get an array of all supported modes in the {lib_dir}. *mcrypt_module_close()* > bool mcrypt_module_close(resource td) This function closes the specified encryption handle. *mcrypt_module_get_algo_block_size()* > int mcrypt_module_get_algo_block_size(string algorithm [, string lib_dir]) This function returns the block size of the algorithm specified in bytes. The optional {lib_dir} parameter can contain the location where the mode module is on the system. *mcrypt_module_get_algo_key_size()* > int mcrypt_module_get_algo_key_size(string algorithm [, string lib_dir]) This function returns the maximum supported key size of the algorithm specified in bytes. The optional {lib_dir} parameter can contain the location where the mode module is on the system. *mcrypt_module_get_supported_key_sizes()* > array mcrypt_module_get_supported_key_sizes(string algorithm [, string lib_dir]) Returns an array with the key sizes supported by the specified algorithm. If it returns an empty array then all key sizes between 1 and |mcrypt_module_get_algo_key_size| are supported by the algorithm. The optional {lib_dir} parameter can contain the location where the mode module is on the system. *mcrypt_module_is_block_algorithm_mode()* > bool mcrypt_module_is_block_algorithm_mode(string mode [, string lib_dir]) This function returns TRUE if the mode is for use with block algorithms, otherwise it returns FALSE. (e.g. FALSE for stream, and TRUE for cbc, cfb, ofb). The optional {lib_dir} parameter can contain the location where the mode module is on the system. *mcrypt_module_is_block_algorithm()* > bool mcrypt_module_is_block_algorithm(string algorithm [, string lib_dir]) This function returns TRUE if the specified algorithm is a block algorithm, or FALSE is it is a stream algorithm. The optional {lib_dir} parameter can contain the location where the algorithm module is on the system. *mcrypt_module_is_block_mode()* > bool mcrypt_module_is_block_mode(string mode [, string lib_dir]) This function returns TRUE if the mode outputs blocks of bytes or FALSE if it outputs just bytes. (e.g. TRUE for cbc and ecb, and FALSE for cfb and stream). The optional {lib_dir} parameter can contain the location where the mode module is on the system. *mcrypt_module_open()* > resource mcrypt_module_open(string algorithm, string algorithm_directory, string mode, string mode_directory) This function opens the module of the algorithm and the mode to be used. The name of the algorithm is specified in algorithm, e.g. "twofish" or is one of the MCRYPT_ciphername constants. The module is closed by calling |mcrypt_module_close|. Normally it returns an encryption descriptor, or FALSE on error. *mcrypt_module_self_test()* > bool mcrypt_module_self_test(string algorithm [, string lib_dir]) This function runs the self test on the algorithm specified. The optional {lib_dir} parameter can contain the location of where the algorithm module is on the system. *mcrypt_ofb()* > string mcrypt_ofb(int cipher, string key, string data, int mode, string iv) The first prototype is when linked against libmcrypt 2.2.x, the second when linked against libmcrypt 2.4.x or higher. The {mode} should be either MCRYPT_ENCRYPT or MCRYPT_DECRYPT. *mdecrypt_generic()* > string mdecrypt_generic(resource td, string data) This function decrypts data. Note that the length of the returned string can in fact be longer then the unencrypted string, due to the padding of the data. ============================================================================== Mcve *php-mcve* *mcve_adduser()* > int mcve_adduser(resource conn, string admin_password, int usersetup) *mcve_adduserarg()* > int mcve_adduserarg(resource usersetup, int argtype, string argval) *mcve_bt()* > int mcve_bt(resource conn, string username, string password) *mcve_checkstatus()* > int mcve_checkstatus(resource conn, int identifier) *mcve_chkpwd()* > int mcve_chkpwd(resource conn, string username, string password) *mcve_chngpwd()* > int mcve_chngpwd(resource conn, string admin_password, string new_password) *mcve_completeauthorizations()* > int mcve_completeauthorizations(resource conn) *mcve_connect()* > int mcve_connect(resource conn) *mcve_connectionerror()* > string mcve_connectionerror(resource conn) *mcve_deleteresponse()* > bool mcve_deleteresponse(resource conn, int identifier) *mcve_deletetrans()* > bool mcve_deletetrans(resource conn, int identifier) *mcve_deleteusersetup()* > void mcve_deleteusersetup(resource usersetup) *mcve_deluser()* > int mcve_deluser(resource conn, string admin_password, string username) *mcve_destroyconn()* > void mcve_destroyconn(resource conn) *mcve_destroyengine()* > void mcve_destroyengine() *mcve_disableuser()* > int mcve_disableuser(resource conn, string admin_password, string username) *mcve_edituser()* > int mcve_edituser(resource conn, string admin_password, int usersetup) *mcve_enableuser()* > int mcve_enableuser(resource conn, string admin_password, string username) *mcve_force()* > int mcve_force(resource conn, string username, string password, string trackdata, string account, string expdate, float amount, string authcode, string comments, string clerkid, string stationid, int ptrannum) *mcve_getcell()* > string mcve_getcell(resource conn, int identifier, string column, int row) *mcve_getcellbynum()* > string mcve_getcellbynum(resource conn, int identifier, int column, int row) *mcve_getcommadelimited()* > string mcve_getcommadelimited(resource conn, int identifier) *mcve_getheader()* > string mcve_getheader(resource conn, int identifier, int column_num) *mcve_getuserarg()* > string mcve_getuserarg(resource usersetup, int argtype) *mcve_getuserparam()* > string mcve_getuserparam(resource conn, int identifier, int key) *mcve_gft()* > int mcve_gft(resource conn, string username, string password, int type, string account, string clerkid, string stationid, string comments, int ptrannum, string startdate, string enddate) *mcve_gl()* > int mcve_gl(int conn, string username, string password, int type, string account, string batch, string clerkid, string stationid, string comments, int ptrannum, string startdate, string enddate) *mcve_gut()* > int mcve_gut(resource conn, string username, string password, int type, string account, string clerkid, string stationid, string comments, int ptrannum, string startdate, string enddate) *mcve_initconn()* > resource mcve_initconn() *mcve_initengine()* > int mcve_initengine(string location) *mcve_initusersetup()* > resource mcve_initusersetup() *mcve_iscommadelimited()* > int mcve_iscommadelimited(resource conn, int identifier) *mcve_liststats()* > int mcve_liststats(resource conn, string admin_password) *mcve_listusers()* > int mcve_listusers(resource conn, string admin_password) *mcve_maxconntimeout()* > bool mcve_maxconntimeout(resource conn, int secs) *mcve_monitor()* > int mcve_monitor(resource conn) *mcve_numcolumns()* > int mcve_numcolumns(resource conn, int identifier) *mcve_numrows()* > int mcve_numrows(resource conn, int identifier) *mcve_override()* > int mcve_override(resource conn, string username, string password, string trackdata, string account, string expdate, float amount, string street, string zip, string cv, string comments, string clerkid, string stationid, int ptrannum) *mcve_parsecommadelimited()* > int mcve_parsecommadelimited(resource conn, int identifier) *mcve_ping()* > int mcve_ping(resource conn) *mcve_preauth()* > int mcve_preauth(resource conn, string username, string password, string trackdata, string account, string expdate, float amount, string street, string zip, string cv, string comments, string clerkid, string stationid, int ptrannum) *mcve_preauthcompletion()* > int mcve_preauthcompletion(resource conn, string username, string password, float finalamount, int sid, int ptrannum) *mcve_qc()* > int mcve_qc(resource conn, string username, string password, string clerkid, string stationid, string comments, int ptrannum) *mcve_responseparam()* > string mcve_responseparam(resource conn, int identifier, string key) *mcve_return()* > int mcve_return(int conn, string username, string password, string trackdata, string account, string expdate, float amount, string comments, string clerkid, string stationid, int ptrannum) *mcve_returncode()* > int mcve_returncode(resource conn, int identifier) *mcve_returnstatus()* > int mcve_returnstatus(resource conn, int identifier) *mcve_sale()* > int mcve_sale(resource conn, string username, string password, string trackdata, string account, string expdate, float amount, string street, string zip, string cv, string comments, string clerkid, string stationid, int ptrannum) *mcve_setblocking()* > int mcve_setblocking(resource conn, int tf) *mcve_setdropfile()* > int mcve_setdropfile(resource conn, string directory) *mcve_setip()* > int mcve_setip(resource conn, string host, int port) *mcve_setssl_files()* > int mcve_setssl_files(string sslkeyfile, string sslcertfile) *mcve_setssl()* > int mcve_setssl(resource conn, string host, int port) *mcve_settimeout()* > int mcve_settimeout(resource conn, int seconds) *mcve_settle()* > int mcve_settle(resource conn, string username, string password, string batch) *mcve_text_avs()* > string mcve_text_avs(string code) *mcve_text_code()* > string mcve_text_code(string code) *mcve_text_cv()* > string mcve_text_cv(int code) *mcve_transactionauth()* > string mcve_transactionauth(resource conn, int identifier) *mcve_transactionavs()* > int mcve_transactionavs(resource conn, int identifier) *mcve_transactionbatch()* > int mcve_transactionbatch(resource conn, int identifier) *mcve_transactioncv()* > int mcve_transactioncv(resource conn, int identifier) *mcve_transactionid()* > int mcve_transactionid(resource conn, int identifier) *mcve_transactionitem()* > int mcve_transactionitem(resource conn, int identifier) *mcve_transactionssent()* > int mcve_transactionssent(resource conn) *mcve_transactiontext()* > string mcve_transactiontext(resource conn, int identifier) *mcve_transinqueue()* > int mcve_transinqueue(resource conn) *mcve_transnew()* > int mcve_transnew(resource conn) *mcve_transparam()* > int mcve_transparam(resource conn, int identifier, int key) *mcve_transsend()* > int mcve_transsend(resource conn, int identifier) *mcve_ub()* > int mcve_ub(resource conn, string username, string password) *mcve_uwait()* > int mcve_uwait(int microsecs) *mcve_verifyconnection()* > bool mcve_verifyconnection(resource conn, int tf) *mcve_verifysslcert()* > bool mcve_verifysslcert(resource conn, int tf) *mcve_void()* > int mcve_void(resource conn, string username, string password, int sid, int ptrannum) ============================================================================== Memcache *php-memcache* *memcache_debug()* > bool memcache_debug(int on_off) |memcache_debug| turns on debug output if parameter {on_off} is equal to 1 and turns off if it's 0. ============================================================================== Mhash *php-mhash* *mhash_count()* > int mhash_count() |mhash_count| returns the highest available hash id. Hashes are numbered from 0 to this hash id. *mhash_get_block_size()* > int mhash_get_block_size(int hash) |mhash_get_block_size| is used to get the size of a block of the specified {hash}. *mhash_get_hash_name()* > string mhash_get_hash_name(int hash) |mhash_get_hash_name| is used to get the name of the specified hash. *mhash_keygen_s2k()* > string mhash_keygen_s2k(int hash, string password, string salt, int bytes) |mhash_keygen_s2k| generates a key that is {bytes} long, from a user given password. This is the Salted S2K algorithm as specified in the OpenPGP document (RFC 2440). That algorithm will use the specified {hash} algorithm to create the key. The {salt} must be different and random enough for every key you generate in order to create different keys. That salt must be known when you check the keys, thus it is a good idea to append the key to it. Salt has a fixed length of 8 bytes and will be padded with zeros if you supply less bytes. *mhash()* > string mhash(int hash, string data [, string key]) |mhash| applies a hash function specified by {hash} to the {data} and returns the resulting hash (also called digest). If the key is specified it will return the resulting HMAC. HMAC is keyed hashing for message authentication, or simply a message digest that depends on the specified key. Not all algorithms supported in mhash can be used in HMAC mode. In case of an error returns FALSE. ============================================================================== Mime_magic *php-mime_magic* *mime_content_type()* > string mime_content_type(string filename) Returns the MIME content type for a file as determined by using information from the magic.mime file. Content types are returned in MIME format, like text/plain or application/octet-stream. ============================================================================== Ming *php-ming* *ming_setcubicthreshold()* > void ming_setcubicthreshold(int threshold) *ming_setscale()* > void ming_setscale(int scale) *ming_useswfversion()* > void ming_useswfversion(int version) *swfaction()* > SWFAction swfaction(string script) |swfaction| creates a new Action, and compiles the given script into an SWFAction object. *swfbitmap()* > SWFBitmap swfbitmap(mixed file [, mixed alphafile]) |swfbitmap| creates a new SWFBitmap object from the Jpeg or DBL file in {file}. {alphafile} is a MSK file to be used as an alpha mask for a Jpeg image. Both parameters can be |fopen| resources or binary strings. *swfbutton_keypress()* > int swfbutton_keypress(string str) *swfbutton()* > SWFButton swfbutton() |swfbutton| creates a new Button. Roll over it, click it, see it call action code. Swank. *swfdisplayitem()* > SWFDisplayItem swfdisplayitem() |swfdisplayitem| creates a new swfdisplayitem object. *swffill()* > SWFFill swffill() The |swffill| object allows you to transform (scale, skew, rotate) bitmap and gradient fills. |swffill| objects are created by the swfshape->addfill methods. *swffont()* > SWFFont swffont(string filename) If {filename} is the name of an FDB file (i.e., it ends in ".fdb"), load the font definition found in said file. Otherwise, create a browser-defined font reference. *swfgradient()* > SWFGradient swfgradient() |swfgradient| creates a new SWFGradient object. *swfmorph()* > SWFMorph swfmorph() |swfmorph| creates a new SWFMorph object. *swfmovie()* > SWFMovie swfmovie() |swfmovie| creates a new movie object, representing an SWF version 4 movie. *swfshape()* > SWFShape swfshape() |swfshape| creates a new shape object. *swfsprite()* > SWFSprite swfsprite() |swfsprite| are also known as a "movie clip", this allows one to create objects which are animated in their own timelines. Hence, the sprite has most of the same methods as the movie. *swftext()* > SWFText swftext() |swftext| creates a new SWFText object, fresh for manipulating. *swftextfield()* > SWFTextField swftextfield( [int flags]) |swftextfield| creates a new text field object. Text Fields are less flexible than |swftext| objects- they can't be rotated, scaled non-proportionally, or skewed, but they can be used as form entries, and they can use browser-defined fonts. ============================================================================== Misc *php-misc* *connection_aborted()* > int connection_aborted() Returns TRUE if client disconnected. See the Connection Handling description in the Features chapter for a complete explanation. *connection_status()* > int connection_status() Returns the connection status bitfield. See the Connection Handling description in the Features chapter for a complete explanation. *connection_timeout()* > bool connection_timeout() Returns TRUE if script timed out. *constant()* > mixed constant(string name) |constant| will return the value of the constant indicated by {name}. *define()* > bool define(string name, mixed value [, bool case_insensitive]) Defines a named constant. See the section on constants for more details. *defined()* > bool defined(string name) Returns TRUE if the named constant given by {name} has been defined, FALSE otherwise. *die()* > void die() This language construct is equivalent to |exit|. *eval()* > mixed eval(string code_str) |eval| evaluates the string given in {code_str} as PHP code. Among other things, this can be useful for storing code in a database text field for later execution. *exit()* > void exit( [string status]) This is not a real function, but a language construct. *get_browser()* > object get_browser( [string user_agent [, bool return_array]]) |get_browser| attempts to determine the capabilities of the user's browser. This is done by looking up the browser's information in the browscap.ini file. *highlight_file()* > mixed highlight_file(string filename [, bool return]) The |highlight_file| function prints out a syntax highlighted version of the code contained in {filename} using the colors defined in the built-in syntax highlighter for PHP. *highlight_string()* > mixed highlight_string(string str [, bool return]) The |highlight_string| function outputs a syntax highlighted version of {str} using the colors defined in the built-in syntax highlighter for PHP. *ignore_user_abort()* > int ignore_user_abort( [bool setting]) This function sets whether a client disconnect should cause a script to be aborted. It will return the previous setting and can be called without an argument to not change the current setting and only return the current setting. See the Connection Handling section in the Features chapter for a complete description of connection handling in PHP. *pack()* > string pack(string format [, mixed args]) Pack given arguments into binary string according to {format}. Returns binary string containing data. *php_check_syntax()* > bool php_check_syntax(string file_name) The |php_check_syntax| function performs a syntax (lint) check on the specified {filename} testing for scripting errors. This is similar to using php -l from the commandline. *php_strip_whitespace()* > string php_strip_whitespace(string filename) Returns the PHP source code in {filename} with PHP comments and whitespace removed. This may be useful for determining the amount of actual code in your scripts compared with the amount of comments. This is similar to using php -w from the commandline. *show_source()* > void show_source() This function is an alias of |highlight_file|. *sleep()* > void sleep(int seconds) The |sleep| function delays program execution for the given number of {seconds}. *time_nanosleep()* > mixed time_nanosleep(int seconds, int nanoseconds) Delays program execution for the given number of {seconds} and {nanoseconds}. *uniqid()* > string uniqid( [string prefix [, bool more_entropy]]) |uniqid| returns a prefixed unique identifier based on the current time in microseconds. {prefix} is optional but can be useful, for instance, if you generate identifiers simultaneously on several hosts that might happen to generate the identifier at the same microsecond. Up until PHP 4.3.1, {prefix} could only be a maximum of 114 characters long. *unpack()* > array unpack(string format, string data) |unpack| from binary string into array according to {format}. Returns array containing unpacked elements of binary string. *usleep()* > void usleep(int micro_seconds) The |usleep| function delays program execution for the given number of {micro_seconds}. A microsecond is one millionth of a second. ============================================================================== Mnogosearch *php-mnogosearch* *udm_add_search_limit()* > bool udm_add_search_limit(resource agent, int var, string val) |udm_add_search_limit| adds search restrictions. Returns TRUE on success or FALSE on failure.; *udm_alloc_agent_array()* > resource udm_alloc_agent_array(array databases) |udm_alloc_agent_array| will create an agent with multiple database connections. The array {databases} must contain one database URL per element, analog to the first parameter of |udm_alloc_agent|. *udm_alloc_agent()* > resource udm_alloc_agent(string dbaddr [, string dbmode]) Returns a mnogosearch agent identifier on success, FALSE on failure. This function creates a session with database parameters. *udm_api_version()* > int udm_api_version() |udm_api_version| returns the mnoGoSearch API version number. E.g. if mnoGoSearch 3.1.10 API is used, this function will return 30110. *udm_cat_list()* > array udm_cat_list(resource agent, string category) Returns an array listing all categories of the same level as the current {category} in the categories tree. {agent} is the agent identifier returned by a previous call to >udm_alloc_agent. *udm_cat_path()* > array udm_cat_path(resource agent, string category) Returns an array describing the path in the categories tree from the tree root to the current one, specified by {category}. {agent} is the agent identifier returned by a previous call to >udm_alloc_agent. *udm_check_charset()* > bool udm_check_charset(resource agent, string charset) *udm_check_stored()* > int udm_check_stored(resource agent, int link, string doc_id) *udm_clear_search_limits()* > bool udm_clear_search_limits(resource agent) |udm_clear_search_limits| resets defined search limitations and returns TRUE. *udm_close_stored()* > int udm_close_stored(resource agent, int link) *udm_crc32()* > int udm_crc32(resource agent, string str) *udm_errno()* > int udm_errno(resource agent) |udm_errno| returns mnoGoSearch error number, zero if no error. *udm_error()* > string udm_error(resource agent) |udm_error| returns mnoGoSearch error message, empty string if no error. *udm_find()* > resource udm_find(resource agent, string query) Returns a result link identifier on success, or FALSE on failure. *udm_free_agent()* > int udm_free_agent(resource agent) Returns TRUE on success or FALSE on failure.; *udm_free_ispell_data()* > bool udm_free_ispell_data(int agent) |udm_free_ispell_data| always returns TRUE. *udm_free_res()* > bool udm_free_res(resource res) Returns TRUE on success or FALSE on failure.; *udm_get_doc_count()* > int udm_get_doc_count(resource agent) |udm_get_doc_count| returns the number of documents in the database. *udm_get_res_field()* > string udm_get_res_field(resource res, int row, int field) |udm_get_res_field| returns result field value on success, FALSE on error. *udm_get_res_param()* > string udm_get_res_param(resource res, int param) |udm_get_res_param| returns result parameter value on success, FALSE on error. *udm_hash32()* > int udm_hash32(resource agent, string str) |udm_hash32| will take a string {str} and return a quite unique 32-bit hash number from it. Requires an allocated {agent}. *udm_load_ispell_data()* > bool udm_load_ispell_data(resource agent, int var, string val1, string val2, int flag) |udm_load_ispell_data| loads ispell data. Returns TRUE on success or FALSE on failure.; *udm_open_stored()* > int udm_open_stored(resource agent, string storedaddr) *udm_set_agent_param()* > bool udm_set_agent_param(resource agent, int var, string val) Returns TRUE on success or FALSE on failure.; Defines mnoGoSearch session parameters. ============================================================================== Monetra *php-monetra* ============================================================================== Msession *php-msession* *msession_connect()* > bool msession_connect(string host, string port) *msession_count()* > int msession_count() *msession_create()* > bool msession_create(string session) *msession_destroy()* > bool msession_destroy(string name) *msession_disconnect()* > void msession_disconnect() *msession_find()* > array msession_find(string name, string value) *msession_get_array()* > array msession_get_array(string session) *msession_get_data()* > string msession_get_data(string session) *msession_get()* > string msession_get(string session, string name, string value) *msession_inc()* > string msession_inc(string session, string name) *msession_list()* > array msession_list() *msession_listvar()* > array msession_listvar(string name) Returns an associative array of value/session for all sessions with a variable named {name}. *msession_lock()* > int msession_lock(string name) *msession_plugin()* > string msession_plugin(string session, string val [, string param]) *msession_randstr()* > string msession_randstr(int param) *msession_set_array()* > bool msession_set_array(string session, array tuples) *msession_set_data()* > bool msession_set_data(string session, string value) *msession_set()* > bool msession_set(string session, string name, string value) *msession_timeout()* > int msession_timeout(string session [, int param]) *msession_uniq()* > string msession_uniq(int param) *msession_unlock()* > int msession_unlock(string session, int key) ============================================================================== Msql *php-msql* *msql_affected_rows()* > int msql_affected_rows(resource query_identifier) Returns number of affected ("touched") rows by a specific query (i.e. the number of rows returned by a SELECT, the number of rows modified by an update, or the number of rows removed by a delete). *msql_close()* > int msql_close( [resource link_identifier]) |msql_close| closes the link to a mSQL database that's associated with the specified link identifier. If the link identifier isn't specified, the last opened link is assumed. *msql_connect()* > int msql_connect( [string hostname [, string username [, string password]]]) |msql_connect| establishes a connection to a mSQL server. The {hostname} parameter can also include a port number. e.g. "hostname:port". It defaults to 'localhost'. *msql_create_db()* > bool msql_create_db(string database_name [, resource link_identifier]) |msql_create_db| attempts to create a new database on the server associated with the specified {link_identifier}. *msql_createdb()* > void msql_createdb() This function is an alias of |msql_create_db|. *msql_data_seek()* > bool msql_data_seek(resource query_identifier, int row_number) |msql_data_seek| moves the internal row pointer of the mSQL result associated with the specified query identifier to point to the specified row number. The next call to |msql_fetch_row| would return that row. *msql_db_query()* > resource msql_db_query(string database, string query [, resource link_identifier]) Returns a positive mSQL query identifier to the query result, or FALSE on error. *msql_dbname()* > void msql_dbname() This function is an alias of |msql_result|. *msql_drop_db()* > int msql_drop_db(string database_name [, resource link_identifier]) Returns TRUE on success or FALSE on failure.; *msql_error()* > string msql_error( [resource link_identifier]) |msql_error| returns the last issued error by the mSQL server or an empty string if no error was issued. If no link is explicitly passed, the last successful open link will be used to retrieve the error message. Note that only the last error message is accessible with |msql_error|. *msql_fetch_array()* > int msql_fetch_array(int query_identifier [, int result_type]) Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. *msql_fetch_field()* > object msql_fetch_field(resource query_identifier [, int field_offset]) Returns an object containing field information *msql_fetch_object()* > int msql_fetch_object(int query_identifier) Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows. *msql_fetch_row()* > array msql_fetch_row(resource query_identifier) Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. *msql_field_flags()* > string msql_field_flags(resource query_identifier, int field_offset) |msql_field_flags| returns the field flags of the specified field. Currently this is either, "not NULL", "primary key", a combination of the two or "" (an empty string). *msql_field_len()* > int msql_field_len(resource query_identifier, int field_offset) |msql_field_len| returns the length of the specified field or FALSE on error. *msql_field_name()* > string msql_field_name(resource query_identifier, int field) |msql_field_name| returns the name of the specified {field} from the result resource {query_identifier}. msql_field_name($result, 2); will return the name of the second field in the result set associated with the result identifier. *msql_field_seek()* > int msql_field_seek(int query_identifier, int field_offset) Seeks to the specified field offset. If the next call to |msql_fetch_field| won't include a field offset, this field would be returned. *msql_field_table()* > int msql_field_table(int query_identifier, int field) Returns the name of the table {field} was fetched from. *msql_field_type()* > string msql_field_type(resource query_identifier, int field_offset) |msql_field_type| is similar to the |msql_field_name| function. The arguments are identical, but the field type is returned. This will be one of "int", "char" or "real". *msql_fieldflags()* > void msql_fieldflags() This function is an alias of |msql_field_flags|. *msql_fieldlen()* > void msql_fieldlen() This function is an alias of |msql_field_len|. *msql_fieldname()* > void msql_fieldname() This function is an alias of |msql_field_name|. *msql_fieldtable()* > void msql_fieldtable() This function is an alias of |msql_field_table|. *msql_fieldtype()* > void msql_fieldtype() This function is an alias of |msql_field_type|. *msql_free_result()* > int msql_free_result(resource query_identifier) |msql_free_result| frees the memory associated with {query_identifier}. When PHP completes a request, this memory is freed automatically, so you only need to call this function when you want to make sure you don't use too much memory while the script is running. *msql_list_dbs()* > resource msql_list_dbs( [resource link_identifier]) |msql_list_dbs| will return a result pointer containing the databases available from the current msql daemon. Use the |msql_result| function to traverse this result pointer. *msql_list_fields()* > resource msql_list_fields(string database, string tablename [, resource link_identifier]) |msql_list_fields| retrieves information about the given {tablename}. The returned result set can be traversed with any function that fetches result sets, such as |msql_fetch_array|. *msql_list_tables()* > resource msql_list_tables(string database [, resource link_identifier]) |msql_list_tables| lists the tables on the specified {database}. It returns a result set which may be traversed with any function that fetches result sets, such as |msql_fetch_array|. *msql_num_fields()* > int msql_num_fields(resource query_identifier) |msql_num_fields| returns the number of fields in a result set. *msql_num_rows()* > int msql_num_rows(resource query_identifier) |msql_num_rows| returns the number of rows in a result set. *msql_numfields()* > void msql_numfields() This function is an alias of |msql_num_fields|. *msql_numrows()* > void msql_numrows() This function is an alias of |msql_num_rows|. *msql_pconnect()* > int msql_pconnect( [string server [, string username [, string password]]]) |msql_pconnect| acts very much like |msql_connect| with two major differences. *msql_query()* > resource msql_query(string query [, resource link_identifier]) |msql_query| sends a query to the currently active database on the server that's associated with the specified link identifier. If the link identifier isn't specified, the last opened link is assumed. If no link is open, the function tries to establish a link as if |msql_connect| was called, and use it. *msql_regcase()* > void msql_regcase() This function is an alias of |sql_regcase|. *msql_result()* > string msql_result(resource query_identifier, int row [, mixed field]) Returns the contents of the cell at the row and offset in the specified mSQL result set. *msql_select_db()* > bool msql_select_db(string database_name [, resource link_identifier]) |msql_select_db| sets the current active database on the server that's associated with the specified {link_identifier}. If no link identifier is specified, the last opened link is assumed. If no link is open, the function will try to establish a link as if |msql_connect| was called, and use it. *msql_tablename()* > void msql_tablename() This function is an alias of |msql_result|. *msql()* > void msql() This function is an alias of |msql_db_query|. ============================================================================== Mssql *php-mssql* *mssql_bind()* > bool mssql_bind(resource stmt, string param_name, int type [, int is_output [, int is_null [, int maxlen]]]) See also |mssql_execute|, |mssql_free_statement|, and |mssql_init|. *mssql_close()* > bool mssql_close( [resource link_identifier]) |mssql_close| closes the link to a MS SQL Server database that's associated with the specified link identifier. If the link identifier isn't specified, the last opened link is assumed. *mssql_connect()* > int mssql_connect( [string servername [, string username [, string password]]]) Returns: A positive MS SQL link identifier on success, or FALSE on error. *mssql_data_seek()* > bool mssql_data_seek(resource result_identifier, int row_number) Returns TRUE on success or FALSE on failure.; *mssql_execute()* > mixed mssql_execute(resource stmt [, bool skip_results]) If the stored procedure returns parameters or a return value these will be available after the call to |mssql_execute| unless the stored procedure returns more than one result set. In that case use |mssql_next_result| to shift through the results. When the last result has been processed the output parameters and return values will be available. *mssql_fetch_array()* > array mssql_fetch_array(resource result [, int result_type]) Returns: An array that corresponds to the fetched row, or FALSE if there are no more rows. *mssql_fetch_assoc()* > array mssql_fetch_assoc(resource result_id) *mssql_fetch_batch()* > int mssql_fetch_batch(resource result_index) *mssql_fetch_field()* > object mssql_fetch_field(resource result [, int field_offset]) Returns an object containing field information. *mssql_fetch_object()* > object mssql_fetch_object(resource result) Returns: An object with properties that correspond to the fetched row, or FALSE if there are no more rows. *mssql_fetch_row()* > array mssql_fetch_row(resource result) Returns: An array that corresponds to the fetched row, or FALSE if there are no more rows. *mssql_field_length()* > int mssql_field_length(resource result [, int offset]) This function returns the length of field no. {offset} in result {result}. If {offset} is omitted, the current field is used. *mssql_field_name()* > string mssql_field_name(resource result [, int offset]) *mssql_field_seek()* > bool mssql_field_seek(resource result, int field_offset) Seeks to the specified field offset. If the next call to |mssql_fetch_field| won't include a field offset, this field would be returned. *mssql_field_type()* > string mssql_field_type(resource result [, int offset]) *mssql_free_result()* > bool mssql_free_result(resource result) |mssql_free_result| only needs to be called if you are worried about using too much memory while your script is running. All result memory will automatically be freed when the script ends. You may call |mssql_free_result| with the result identifier as an argument and the associated result memory will be freed. *mssql_free_statement()* > bool mssql_free_statement(resource statement) |mssql_free_statement| only needs to be called if you are worried about using too much memory while your script is running. All statement memory will automatically be freed when the script ends. You may call |mssql_free_statement| with the statement identifier as an argument and the associated statement memory will be freed. *mssql_get_last_message()* > string mssql_get_last_message() *mssql_guid_string()* > string mssql_guid_string(string binary [, int short_format]) *mssql_init()* > int mssql_init(string sp_name [, resource conn_id]) See also |mssql_bind|, |mssql_execute|, and |mssql_free_statement| *mssql_min_error_severity()* > void mssql_min_error_severity(int severity) *mssql_min_message_severity()* > void mssql_min_message_severity(int severity) *mssql_next_result()* > bool mssql_next_result(resource result_id) When sending more than one SQL statement to the server or executing a stored procedure with multiple results, it will cause the server to return multiple result sets. This function will test for additional results available form the server. If an additional result set exists it will free the existing result set and prepare to fetch the rows from the new result set. The function will return TRUE if an additional result set was available or FALSE otherwise. *mssql_num_fields()* > int mssql_num_fields(resource result) |mssql_num_fields| returns the number of fields in a result set. *mssql_num_rows()* > int mssql_num_rows(resource result) |mssql_num_rows| returns the number of rows in a result set. *mssql_pconnect()* > int mssql_pconnect( [string servername [, string username [, string password]]]) Returns: A positive MS SQL persistent link identifier on success, or FALSE on error. *mssql_query()* > resource mssql_query(string query [, resource link_identifier [, int batch_size]]) Returns: A positive MS SQL result identifier on success, TRUE if no rows were returned, or FALSE on error. *mssql_result()* > string mssql_result(resource result, int row, mixed field) |mssql_result| returns the contents of one cell from a MS SQL result set. The field argument can be the field's offset, the field's name or the field's table dot field's name (tablename.fieldname). If the column name has been aliased ('select foo as bar from...'), it uses the alias instead of the column name. *mssql_rows_affected()* > int mssql_rows_affected(resource conn_id) *mssql_select_db()* > bool mssql_select_db(string database_name [, resource link_identifier]) Returns TRUE on success or FALSE on failure.; ============================================================================== Muscat *php-muscat* *muscat_close()* > int muscat_close(resource muscat_handle) *muscat_get()* > string muscat_get(resource muscat_handle) *muscat_give()* > int muscat_give(resource muscat_handle, string string) *muscat_setup_net()* > resource muscat_setup_net(string muscat_host) |muscat_setup_net| creates a new muscat session and returns the handle. *muscat_setup()* > resource muscat_setup(int size [, string muscat_dir]) ============================================================================== Mysql *php-mysql* *mysql_affected_rows()* > int mysql_affected_rows( [resource link_identifier]) |mysql_affected_rows| returns the number of rows affected by the last INSERT, UPDATE or DELETE query associated with {link_identifier}. If the link identifier isn't specified, the last link opened by |mysql_connect| is assumed. *mysql_change_user()* > int mysql_change_user(string user, string password [, string database [, resource link_identifier]]) |mysql_change_user| changes the logged in user of the current active connection, or the connection given by the optional {link_identifier} parameter. If a database is specified, this will be the current database after the user has been changed. If the new user and password authorization fails, the current connected user stays active. Returns TRUE on success or FALSE on failure.; *mysql_client_encoding()* > string mysql_client_encoding( [resource link_identifier]) |mysql_client_encoding| returns the default character set name for the current connection. *mysql_close()* > bool mysql_close( [resource link_identifier]) Returns TRUE on success or FALSE on failure.; *mysql_connect()* > resource mysql_connect( [string server [, string username [, string password [, bool new_link [, int client_flags]]]]]) Returns a MySQL link identifier on success, or FALSE on failure. *mysql_create_db()* > bool mysql_create_db(string database_name [, resource link_identifier]) |mysql_create_db| attempts to create a new database on the server associated with the specified link identifier. *mysql_data_seek()* > bool mysql_data_seek(resource result_identifier, int row_number) |mysql_data_seek| moves the internal row pointer of the MySQL result associated with the specified result identifier to point to the specified row number. The next call to |mysql_fetch_row| would return that row. *mysql_db_name()* > string mysql_db_name(resource result, int row [, mixed field]) |mysql_db_name| takes as its first parameter the result pointer from a call to |mysql_list_dbs|. The {row} parameter is an index into the result set. *mysql_db_query()* > resource mysql_db_query(string database, string query [, resource link_identifier]) Returns a positive MySQL result resource to the query result, or FALSE on error. The function also returns TRUE/FALSE for INSERT/UPDATE/DELETE queries to indicate success/failure. *mysql_drop_db()* > bool mysql_drop_db(string database_name [, resource link_identifier]) |mysql_drop_db| attempts to drop (remove) an entire database from the server associated with the specified link identifier. *mysql_errno()* > int mysql_errno( [resource link_identifier]) Returns the error number from the last MySQL function, or 0 (zero) if no error occurred. *mysql_error()* > string mysql_error( [resource link_identifier]) Returns the error text from the last MySQL function, or '' (the empty string) if no error occurred. If no link is explicitly passed to the function, the last successful open link will be used to retrieve the error message from the MySQL server. *mysql_escape_string()* > string mysql_escape_string(string unescaped_string) This function will escape the {unescaped_string}, so that it is safe to place it in a |mysql_query|. *mysql_fetch_array()* > array mysql_fetch_array(resource result [, int result_type]) Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. *mysql_fetch_assoc()* > array mysql_fetch_assoc(resource result) Returns an associative array that corresponds to the fetched row, or FALSE if there are no more rows. *mysql_fetch_field()* > object mysql_fetch_field(resource result [, int field_offset]) Returns an object containing field information. *mysql_fetch_lengths()* > array mysql_fetch_lengths(resource result) Returns an array that corresponds to the lengths of each field in the last row fetched by |mysql_fetch_row|, or FALSE on error. *mysql_fetch_object()* > object mysql_fetch_object(resource result) Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows. *mysql_fetch_row()* > array mysql_fetch_row(resource result) Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. *mysql_field_flags()* > string mysql_field_flags(resource result, int field_offset) |mysql_field_flags| returns the field flags of the specified field. The flags are reported as a single word per flag separated by a single space, so that you can split the returned value using |explode|. *mysql_field_len()* > int mysql_field_len(resource result, int field_offset) |mysql_field_len| returns the length of the specified field. *mysql_field_name()* > string mysql_field_name(resource result, int field_index) |mysql_field_name| returns the name of the specified field index. {result} must be a valid result identifier and {field_index} is the numerical offset of the field. *mysql_field_seek()* > int mysql_field_seek(resource result, int field_offset) Seeks to the specified field offset. If the next call to |mysql_fetch_field| doesn't include a field offset, the field offset specified in |mysql_field_seek| will be returned. *mysql_field_table()* > string mysql_field_table(resource result, int field_offset) Returns the name of the table that the specified field is in. *mysql_field_type()* > string mysql_field_type(resource result, int field_offset) |mysql_field_type| is similar to the |mysql_field_name| function. The arguments are identical, but the field type is returned instead. The field type will be one of "int", "real", "string", "blob", and others as detailed in the MySQL documentation. |mysql_field_type| example ]]> The above example would produce the following output: *mysql_free_result()* > bool mysql_free_result(resource result) |mysql_free_result| will free all memory associated with the result identifier {result}. *mysql_get_client_info()* > string mysql_get_client_info() |mysql_get_client_info| returns a string that represents the client library version. *mysql_get_host_info()* > string mysql_get_host_info( [resource link_identifier]) |mysql_get_host_info| returns a string describing the type of connection in use for the connection {link_identifier}, including the server host name. If {link_identifier} is omitted, the last opened connection will be used. *mysql_get_proto_info()* > int mysql_get_proto_info( [resource link_identifier]) |mysql_get_proto_info| returns the protocol version used by connection {link_identifier}. If {link_identifier} is omitted, the last opened connection will be used. *mysql_get_server_info()* > string mysql_get_server_info( [resource link_identifier]) |mysql_get_server_info| returns the server version used by connection {link_identifier}. If {link_identifier} is omitted, the last opened connection will be used. *mysql_info()* > string mysql_info( [resource link_identifier]) |mysql_info| returns detailed information about the last query using the given {link_identifier}. If {link_identifier} isn't specified, the last opened link is assumed. *mysql_insert_id()* > int mysql_insert_id( [resource link_identifier]) |mysql_insert_id| returns the ID generated for an AUTO_INCREMENT column by the previous INSERT query using the given {link_identifier}. If {link_identifier} isn't specified, the last opened link is assumed. *mysql_list_dbs()* > resource mysql_list_dbs( [resource link_identifier]) |mysql_list_dbs| will return a result pointer containing the databases available from the current mysql daemon. Use the |mysql_tablename| function to traverse this result pointer, or any function for result tables, such as |mysql_fetch_array|. *mysql_list_fields()* > resource mysql_list_fields(string database_name, string table_name [, resource link_identifier]) The function |mysql_list_fields| is deprecated. It is preferable to use |mysql_query| to issue a SQL SHOW COLUMNS FROM table [LIKE 'name'] Statement instead. *mysql_list_processes()* > resource mysql_list_processes( [resource link_identifier]) |mysql_list_processes| returns a result pointer describing the current server threads. *mysql_list_tables()* > resource mysql_list_tables(string database [, resource link_identifier]) |mysql_list_tables| takes a database name and returns a result pointer much like the |mysql_query| function. Use the |mysql_tablename| function to traverse this result pointer, or any function for result tables, such as |mysql_fetch_array|. *mysql_num_fields()* > int mysql_num_fields(resource result) |mysql_num_fields| returns the number of fields in the result set {result}. *mysql_num_rows()* > int mysql_num_rows(resource result) |mysql_num_rows| returns the number of rows in a result set. This command is only valid for SELECT statements. To retrieve the number of rows affected by a INSERT, UPDATE or DELETE query, use |mysql_affected_rows|. |mysql_num_rows| example ]]> *mysql_pconnect()* > resource mysql_pconnect( [string server [, string username [, string password [, int client_flags]]]]) Returns a positive MySQL persistent link identifier on success, or FALSE on error. *mysql_ping()* > bool mysql_ping( [resource link_identifier]) |mysql_ping| checks whether or not the connection to the server is working. If it has gone down, an automatic reconnection is attempted. This function can be used by scripts that remain idle for a long while, to check whether or not the server has closed the connection and reconnect if necessary. |mysql_ping| returns TRUE if the connection to the server is working, otherwise FALSE. *mysql_query()* > resource mysql_query(string query [, resource link_identifier]) |mysql_query| sends a query to the currently active database on the server that's associated with the specified link identifier. If {link_identifier} isn't specified, the last opened link is assumed. If no link is open, the function tries to establish a link as if |mysql_connect| was called with no arguments, and use it. The result of the query is buffered. *mysql_real_escape_string()* > string mysql_real_escape_string(string unescaped_string [, resource link_identifier]) {unescaped_string} The string to escape {link_identifier} (optional) The mysql connection resource *mysql_result()* > mixed mysql_result(resource result, int row [, mixed field]) |mysql_result| returns the contents of one cell from a MySQL result set. The field argument can be the field's offset, or the field's name, or the field's table dot field name (tablename.fieldname). If the column name has been aliased ('select foo as bar from...'), use the alias instead of the column name. *mysql_select_db()* > bool mysql_select_db(string database_name [, resource link_identifier]) Returns TRUE on success or FALSE on failure.; *mysql_stat()* > string mysql_stat( [resource link_identifier]) |mysql_stat| returns the current server status. *mysql_tablename()* > string mysql_tablename(resource result, int i) |mysql_tablename| takes a result pointer returned by the |mysql_list_tables| function as well as an integer index and returns the name of a table. The |mysql_num_rows| function may be used to determine the number of tables in the result pointer. Use the |mysql_tablename| function to traverse this result pointer, or any function for result tables, such as |mysql_fetch_array|. |mysql_tablename| example ]]> *mysql_thread_id()* > int mysql_thread_id( [resource link_identifier]) |mysql_thread_id| returns the current thread ID. If the connection is lost and you reconnect with |mysql_ping|, the thread ID will change. This means you should not get the thread ID and store it for later. You should get it when you need it. *mysql_unbuffered_query()* > resource mysql_unbuffered_query(string query [, resource link_identifier]) |mysql_unbuffered_query| sends a SQL query {query} to MySQL, without fetching and buffering the result rows automatically, as |mysql_query| does. On the one hand, this saves a considerable amount of memory with SQL queries that produce large result sets. On the other hand, you can start working on the result set immediately after the first row has been retrieved: you don't have to wait until the complete SQL query has been performed. When using multiple DB-connects, you have to specify the optional parameter {link_identifier}. ============================================================================== Mysqli *php-mysqli* *mysqli_affected_rows()* > mixed mysqli_affected_rows(mysqli link) Procedural style: *mysqli_autocommit()* > bool mysqli_autocommit(mysqli link, bool mode) Procedural style: *mysqli_bind_param()* > void mysqli_bind_param() This function is an alias of |mysqli_stmt_bind_param|. For a detailled descripton see description of |mysqli_stmt_bind_param|. *mysqli_bind_result()* > void mysqli_bind_result() This function is an alias of |mysqli_stmt_bind_result|. For a detailled descripton see description of |mysqli_stmt_bind_result|. *mysqli_change_user()* > bool mysqli_change_user(mysqli link, string user, string password, string database) Procedural style: *mysqli_character_set_name()* > string mysqli_character_set_name(mysqli link) Procedural style: *mysqli_client_encoding()* > void mysqli_client_encoding() This function is an alias of |mysqli_character_set_name|. For a detailled descripton see description of |mysqli_character_set_name|. *mysqli_close()* > bool mysqli_close(mysqli link) Procedural style: *mysqli_commit()* > bool mysqli_commit(mysqli link) Procedural style: *mysqli_connect_errno()* > int mysqli_connect_errno() The |mysqli_connect_errno| function will return the last error code number for last call to |mysqli_connect|. If no errors have occured, this function will return zero. *mysqli_connect_error()* > string mysqli_connect_error() The |mysqli_connect_error| function is identical to the corresponding |mysqli_connect_errno| function in every way, except instead of returning an integer error code the |mysqli_connect_error| function will return a string representation of the last error to occur for the last |mysqli_connect| call. If no error has occured, this function will return an empty string. *mysqli_connect()* > mysqli mysqli_connect() Procedural style *mysqli_data_seek()* > bool mysqli_data_seek(mysqli_result result, int offset) Procedural style: *mysqli_debug()* > void mysqli_debug(string debug) The |mysqli_debug| function is used to perform debugging operations using the Fred Fish debugging library. The {debug} parameter is a string representing the debugging operation to perform. *mysqli_disable_reads_from_master()* > void mysqli_disable_reads_from_master(mysqli link) Procedural style: *mysqli_disable_rpl_parse()* > void mysqli_disable_rpl_parse(mysqli link) *mysqli_dump_debug_info()* > bool mysqli_dump_debug_info(mysqli link) This function is designed to be executed by an user with the SUPER privilege and is used to dump debugging information into the log for the MySQL Server relating to the connection specified by the {link} parameter. *mysqli_embedded_connect()* > mysqli mysqli_embedded_connect( [string dbname]) *mysqli_enable_reads_from_master()* > void mysqli_enable_reads_from_master(mysqli link) *mysqli_enable_rpl_parse()* > void mysqli_enable_rpl_parse(mysqli link) *mysqli_errno()* > int mysqli_errno(mysqli link) Procedural style: *mysqli_error()* > string mysqli_error(mysqli link) Procedural style: *mysqli_escape_string()* > void mysqli_escape_string() This function is an alias of |mysqli_real_escape_string|. *mysqli_execute()* > void mysqli_execute() This function is an alias of |mysqli_stmt_execute|. For a detailled descripton see description of |mysqli_stmt_execute|. *mysqli_fetch_array()* > mixed mysqli_fetch_array(mysqli_result result) Procedural style: *mysqli_fetch_assoc()* > array mysqli_fetch_assoc(mysqli_result result) Procedural style: *mysqli_fetch_field_direct()* > mixed mysqli_fetch_field_direct(mysqli_result result, int fieldnr) Procedural style: *mysqli_fetch_field()* > mixed mysqli_fetch_field(mysqli_result result) Procedural style: *mysqli_fetch_fields()* > mixed mysqli_fetch_fields(mysqli_result result) Procedural Style: *mysqli_fetch_lengths()* > mixed mysqli_fetch_lengths(mysqli_result result) Procedural style: *mysqli_fetch_object()* > mixed mysqli_fetch_object(mysqli_result result) Procedural style: *mysqli_fetch_row()* > mixed mysqli_fetch_row(mysqli_result result) Procedural style: *mysqli_fetch()* > void mysqli_fetch() This function is an alias of |mysqli_stmt_fetch|. For a detailled descripton see description of |mysqli_stmt_fetch|. *mysqli_field_count()* > int mysqli_field_count(mysqli link) Procedural style: *mysqli_field_seek()* > int mysqli_field_seek(mysqli_result result, int fieldnr) Procedural style: *mysqli_field_tell()* > int mysqli_field_tell(mysqli_result result) Procedural style: *mysqli_free_result()* > void mysqli_free_result(mysqli_result result) Procedural style: *mysqli_get_client_info()* > string mysqli_get_client_info() The |mysqli_get_client_info| function is used to return a string representing the client version being used in the MySQLi extension. *mysqli_get_client_version()* > int mysqli_get_client_version() Returns client version number as an integer. *mysqli_get_host_info()* > string mysqli_get_host_info(mysqli link) Procdural style: *mysqli_get_metadata()* > void mysqli_get_metadata() This function is an alias