CI_Input::ip_address()

ip_address() Returns: Visitor’s IP address or ‘0.0.0.0’ if not valid Return type: string Returns the IP address for the current user. If the IP address is not valid, the method will return ‘0.0.0.0’: echo $this->input->ip_address(); Important This method takes into account the $config['proxy_ips'] setting and will return the reported HTTP_X_FORWARDED_FOR, HTTP_CLIENT_IP, HTTP_X_CLIENT_IP or HTTP_X_CLUSTER_CLIENT_IP address for the allowed IP addresses.

CI_Input::input_stream()

input_stream([$index = NULL[, $xss_clean = NULL]]) Parameters: $index (mixed) – Key name $xss_clean (bool) – Whether to apply XSS filtering Returns: Input stream array if no parameters supplied, otherwise the specified value if found or NULL if not Return type: mixed This method is identical to get(), post() and cookie(), only it fetches the php://input stream data.

CI_Input::get_request_header()

get_request_header($index[, $xss_clean = FALSE]) Parameters: $index (string) – HTTP request header name $xss_clean (bool) – Whether to apply XSS filtering Returns: An HTTP request header or NULL if not found Return type: string Returns a single member of the request headers array or NULL if the searched header is not found. $this->input->get_request_header('some-header', TRUE);

CI_Input::get_post()

get_post($index[, $xss_clean = NULL]) Parameters: $index (string) – GET/POST parameter name $xss_clean (bool) – Whether to apply XSS filtering Returns: GET/POST value if found, NULL if not Return type: mixed This method works the same way as post_get() only it looks for GET data first. $this->input->get_post(‘some_data’, TRUE); Note This method used to act EXACTLY like post_get(), but it’s behavior has changed in CodeIgniter 3.0.

CI_Input::get()

get([$index = NULL[, $xss_clean = NULL]]) Parameters: $index (mixed) – GET parameter name $xss_clean (bool) – Whether to apply XSS filtering Returns: $_GET if no parameters supplied, otherwise the GET value if found or NULL if not Return type: mixed This method is identical to post(), only it fetches GET data. $this->input->get('some_data', TRUE); To return an array of all GET items call without any parameters. To return all GET items and pass them through the XSS filter set

CI_Input::cookie()

cookie([$index = NULL[, $xss_clean = NULL]]) Parameters: $index (mixed) – COOKIE name $xss_clean (bool) – Whether to apply XSS filtering Returns: $_COOKIE if no parameters supplied, otherwise the COOKIE value if found or NULL if not Return type: mixed This method is identical to post() and get(), only it fetches cookie data: $this->input->cookie('some_cookie'); $this->input->cookie('some_cookie, TRUE); // with XSS filter To return an array of multiple cookie values, pa

CI_Input

class CI_Input $raw_input_stream Read only property that will return php://input data as is. The property can be read multiple times. post([$index = NULL[, $xss_clean = NULL]]) Parameters: $index (mixed) – POST parameter name $xss_clean (bool) – Whether to apply XSS filtering Returns: $_POST if no parameters supplied, otherwise the POST value if found or NULL if not Return type: mixed The first parameter will contain the name of the POST item you are looking for: $this->i

CI_Image_lib::watermark()

watermark() Returns: TRUE on success, FALSE on failure Return type: bool Creates a watermark over an image, please refer to the Watermarking an Image section for more info.

CI_Image_lib::rotate()

rotate() Returns: TRUE on success, FALSE on failure Return type: bool The image rotation method requires that the angle of rotation be set via its preference: $config['rotation_angle'] = '90'; There are 5 rotation options: 90 - rotates counter-clockwise by 90 degrees. 180 - rotates counter-clockwise by 180 degrees. 270 - rotates counter-clockwise by 270 degrees. hor - flips the image horizontally. vrt - flips the image vertically. Here’s an example showing how you might rotate an image:

CI_Image_lib::resize()

resize() Returns: TRUE on success, FALSE on failure Return type: bool The image resizing method lets you resize the original image, create a copy (with or without resizing), or create a thumbnail image. For practical purposes there is no difference between creating a copy and creating a thumbnail except a thumb will have the thumbnail marker as part of the name (i.e. mypic_thumb.jpg). All preferences listed in the Preferences table are available for this method except these three: rotation