| 3 | | This is a stub (please write me) |
| | 3 | todo describe class |
| | 4 | |
| | 5 | ## Methods |
| | 6 | |
| | 7 | ### Fetch item from GET array |
| | 8 | <code>$this->input->get()</code> accepts multiple optional parameters. |
| | 9 | Returns item as a string or <code>FALSE</code> if item does not exist. |
| | 10 | |
| | 11 | $get_item = $this->input->get($index = 'item', $xss_clean = TRUE); |
| | 12 | |
| | 13 | Setting <code>$index = FALSE</code> returns the GET array.<br /> |
| | 14 | Setting <code>$xss_clean = TRUE</code> filters GET for unsafe data. |
| | 15 | |
| | 16 | **** |
| | 17 | |
| | 18 | ### Fetch item from POST array |
| | 19 | <code>$this->input->post()</code> accepts multiple optional parameters. |
| | 20 | Returns item as a string or <code>FALSE</code> if item does not exist. |
| | 21 | |
| | 22 | $post_item = $this->input->post($index = 'item', $xss_clean = TRUE); |
| | 23 | |
| | 24 | Setting <code>$index = FALSE</code> returns the POST array.<br /> |
| | 25 | Setting <code>$xss_clean = TRUE</code> filters POST for unsafe data. |
| | 26 | |
| | 27 | **** |
| | 28 | |
| | 29 | ### Fetch item from COOKIE array |
| | 30 | <code>$this->input->post()</code> accepts multiple optional parameters. |
| | 31 | Returns item as a string or <code>FALSE</code> if item does not exist. |
| | 32 | |
| | 33 | $cookie_item = $this->input->post($index = 'item', $xss_clean = TRUE); |
| | 34 | |
| | 35 | Setting <code>$index = FALSE</code> returns the COOKIE array.<br /> |
| | 36 | Setting <code>$xss_clean = TRUE</code> filters COOKIE for unsafe data. |
| | 37 | |
| | 38 | **** |
| | 39 | |
| | 40 | ### Fetch item from SERVER array |
| | 41 | <code>$this->input->server()</code> accepts multiple optional parameters. |
| | 42 | Returns item as a string or <code>FALSE</code> if item does not exist. |
| | 43 | |
| | 44 | $server_item = $this->input->server($index = 'item', $xss_clean = TRUE); |
| | 45 | |
| | 46 | Setting <code>$index = FALSE</code> returns the SERVER array.<br /> |
| | 47 | Setting <code>$xss_clean = TRUE</code> filters SERVER for unsafe data |
| | 48 | |
| | 49 | **** |
| | 50 | |
| | 51 | ### Fetch IP address from SERVER array |
| | 52 | <code>$this->input->ip_address()</code> has no parameters. |
| | 53 | Returns IP address as a string in dotted quad notation eg. <code>"192.0.0.12"</code><br /> |
| | 54 | Returns <code>"0.0.0.0"</code> if IP address is not found or invalid. |
| | 55 | |
| | 56 | echo $this->input->ip_address(); |
| | 57 | |
| | 58 | **** |
| | 59 | |
| | 60 | ### Validate IP address from SERVER array |
| | 61 | <code>$this->input->valid_ip()</code> accepts one mandatory parameter. |
| | 62 | Returns <code>FALSE</code> if IP address is invalid. |
| | 63 | |
| | 64 | $ip = "192.0.0.44"; |
| | 65 | echo $this->input->valid_ip($ip); |
| | 66 | |
| | 67 | **** |
| | 68 | |
| | 69 | ### Fetch USER_AGENT from SERVER array |
| | 70 | <code>$this->input->user_agent()</code> has no parameters. |
| | 71 | Returns the user agent as a string.<br /> |
| | 72 | Returns <code>FALSE</code> if user agent is not found. |
| | 73 | |
| | 74 | echo $this->input->user_agent(); |
| | 75 | |
| | 76 | **** |
| | 77 | |
| | 78 | ### Filter input for XSS |
| | 79 | <code>$this->input->xss_clean()</code> accepts multiple parameters. Input string to filter is required. |
| | 80 | Returns a string with unsafe data filtered out. Note: The input data may be **modified** by filtering. |
| | 81 | |
| | 82 | $clean_item = $this->input->xss_clean($item, charset = 'ISO-8859-1'); |
| | 83 | |
| | 84 | |
| | 85 | |
| | 86 | |
| | 87 | |
| | 88 | <?php echo $this->load->view('user_guide/en/abbr') ?> |
| | 89 | <?php /* $Id$ */ ?> |