CI_Zip::download()

download($filename = 'backup.zip') Parameters: $filename (string) – Archive file name Return type: void Causes the Zip file to be downloaded from your server. You must pass the name you would like the zip file called. Example: $this->zip->download('latest_stuff.zip'); // File will be named "latest_stuff.zip" Note Do not display any data in the controller in which you call this method since it sends various server headers that cause the download to happen and the file to be tre

CI_Zip::add_data()

add_data($filepath[, $data = NULL]) Parameters: $filepath (mixed) – A single file path or an array of file => data pairs $data (array) – File contents (ignored if $filepath is an array) Return type: void Adds data to the Zip archive. Can work both in single and multiple files mode. When adding a single file, the first parameter must contain the name you would like given to the file and the second must contain the file contents: $name = 'mydata1.txt'; $data = 'A Data String!'; $thi

CI_Zip::archive()

archive($filepath) Parameters: $filepath (string) – Path to target zip archive Returns: TRUE on success, FALSE on failure Return type: bool Writes the Zip-encoded file to a directory on your server. Submit a valid server path ending in the file name. Make sure the directory is writable (755 is usually OK). Example: $this->zip->archive('/path/to/folder/myarchive.zip'); // Creates a file named myarchive.zip

CI_Xmlrpc::send_error_message()

send_error_message($number, $message) Parameters: $number (int) – Error number $message (string) – Error message Returns: XML_RPC_Response instance Return type: XML_RPC_Response This method lets you send an error message from your server to the client. First parameter is the error number while the second parameter is the error message. return $this->xmlrpc->send_error_message(123, 'Requested data not available');

CI_Xmlrpc::request()

request($incoming) Parameters: $incoming (array) – Request data Return type: void Takes an array of data and builds request to be sent to XML-RPC server: $request = array(array('My Photoblog', 'string'), 'http://www.yoursite.com/photoblog/'); $this->xmlrpc->request($request);

CI_Xmlrpc::send_request()

send_request() Returns: TRUE on success, FALSE on failure Return type: bool The request sending method. Returns boolean TRUE or FALSE based on success for failure, enabling it to be used conditionally.

CI_Xmlrpc::initialize()

initialize([$config = array()]) Parameters: $config (array) – Configuration data Return type: void Initializes the XML-RPC library. Accepts an associative array containing your settings.

CI_Xmlrpc::method()

method($function) Parameters: $function (string) – Method name Return type: void Sets the method that will be requested from the XML-RPC server: $this->xmlrpc->method('method'); Where method is the name of the method.

CI_Xmlrpc::server()

server($url[, $port = 80[, $proxy = FALSE[, $proxy_port = 8080]]]) Parameters: $url (string) – XML-RPC server URL $port (int) – Server port $proxy (string) – Optional proxy $proxy_port (int) – Proxy listening port Return type: void Sets the URL and port number of the server to which a request is to be sent: $this->xmlrpc->server('http://www.sometimes.com/pings.php', 80); Basic HTTP authentication is also supported, simply add it to the server URL: $this->xmlrpc->server

CI_User_agent::referrer()

referrer() Returns: Detected referrer or an empty string Return type: string The referrer, if the user agent was referred from another site. Typically you’ll test for this as follows: if ($this->agent->is_referral()) { echo $this->agent->referrer(); }