( ! ) Warning: Creating default object from empty value in /var/www/clients/client1/web1/web/modules/Forums/common.php on line 421
Call Stack
#TimeMemoryFunctionLocation
10.1385359160{main}( ).../modules.php:0
20.1473370984include( '/var/www/clients/client1/web1/web/index.php ).../modules.php:4
30.5969814360include( '/var/www/clients/client1/web1/web/modules/PHP_Manual/index.php ).../index.php:179
40.6100815464include( '/var/www/clients/client1/web1/web/header.php ).../index.php:157
50.6100832064head( ).../header.php:112
60.6100832648online( ).../header.php:39
70.6100832648my_online( ).../mainfile.php:720
80.6107835920include( '/var/www/clients/client1/web1/web/modules/Forums/common.php ).../custom_mainfile.php:1151
Omega13a's Corner - PHP Manual - Reference - Filter
Omega13a's Corner
Contribute To This Site
Submit a Download
Submit a Link
Submit A Review for Omega13a's Corner

This Website Is Best Viewed In Mozilla Firefox 0.9+
You Are Currently Using
  Login or Register
::  Home   ::  Your Account   ::  Forums   ::  UFT Encyclopedia   ::  UFT Writer  ::
2020.8
Omega13a's Wish List
My Amazon.com Wish List
 
Affiliates
Supported by

[ Be A Supporter ]
[ NukeSupporters( tm) ]
 
Navigation
· Hom e
· Rep ort An Error

Omega13a's Corner

· Ome ga13a's Corner Index
· Ana grams
· Ana grams
· Aut ograms
· Aut ograms
· Bum per Stickers
· Bum per Stickers
· Cow Analogies
· Cow Analogies
· Cru el Baby Names
· Cru el Baby Names
· DHT ML Tricks
· DHT ML Tricks
· Dum b Criminals
· Dum b Criminals
· Dum b Headlines
· Dum b Headlines
· Dum b Laws
· Dum b Laws
· Dum b Questions
· Dum b Questions
· Dum b Quotes
· Dum b Quotes
· Dum b Signs
· Dum b Signs
· Dum b Warning Labels
· Dum b Warning Labels
· Eye witness Reports
· Eye witness Reports
· Fea rs
· Fea rs
· Gam es
· Gam es
· Goo gle Searches
· Goo gle Searches
· Gra phing Calculator
· Gra phing Calculator
· Hor oscope
· Hor oscope
· hta ccess Tutorials
· hta ccess Tutorials
· HTM L Manual
· HTM L Manual
· IP Lookup
· IP Lookup
· Jok es
· Jok es
· Mis c Funny Stuff
· Mis c Funny Stuff
· Odd Books
· Odd Books
· Odd Place Names
· Odd Place Names
· Odd Product Names
· Odd Product Names
· Our Solar System
· Our Solar System
· Pal indromes
· Pal indromes
· Pan grams
· Pan grams
· PEA R Manual
· PEA R Manual
· PHP Manual
· PHP Manual
· PHP Nuke Tools
· PHP Nuke Tools
· Poi ntless Quizzes
· Poi ntless Quizzes
· Pri me Numbers
· Pri me Numbers
· Ran dom Quotes
· Ran dom Quotes
· Ran t
· Ran t
· Rev iews
· Rev iews
· Rhy ming Pairs
· Rhy ming Pairs
· Sci -Fi/Fantasy Encyclopedia
· Sci -Fi/Fantasy Encyclopedia
· Wea ther
· Wea ther
· Wei rd Ads
· Wei rd Ads
· Wei rd Wide Web
· Wei rd Wide Web
· Zen Sarcasms
· Zen Sarcasms

Star Trek

·&nbs pBorg Species Designations
· Bor g Species Designations
· FAQ
· FAQ
· Sev Trek
· Sev Trek
· Sta r Trek Alien Sayings
· Sta r Trek Alien Sayings
· Sta r Trek Eggs
· Sta r Trek Eggs
· Sta r Trek Encyclopedia
· Sta r Trek Encyclopedia
· Sta r Trek Episode Guides
· Sta r Trek Episode Guides
· Sta r Trek Goofs
· Sta r Trek Goofs
· Sta r Trek Mysteries
· Sta r Trek Mysteries
· Sta r Trek Reviews
· Sta r Trek Reviews
· Sta r Trek Timeline
· Sta r Trek Timeline
· Tre k Today Headlines
· Tre k Today Headlines
· Wor lds in Star Trek
· Wor lds in Star Trek

Community

· Cha t Bot
· Cha t Bot
· Cha t Room
· Cha t Room
· Fee dback
· Fee dback
· For ums
· For ums
· Gue stbook
· Gue stbook
· Joi n a Webring
· Joi n a Webring
· Joi n the Staff
· Joi n the Staff
· Mem bers List
· Mem bers List
· Pri vate Messages
· Pri vate Messages
· Rec ommend Us
· Rec ommend Us
· Rul es/Terms of Use
· Rul es/Terms of Use
· Sur veys
· Sur veys
· Use r Journals
· Use r Journals
· Vot e For Us
· Vot e For Us
· Win An Award
· Win An Award
· You r Account
· You r Account

Media/Arts

· Dow nloads
· Dow nloads
· Fan Fictions
· Fan Fictions
· Han gman
· Han gman
· Ima ge Gallery
· Ima ge Gallery
· Tec hnobable Generator
· Tec hnobable Generator

Staff Personal Sections

· Lad y Lursa's Reading Corner

Links and Webrings

· Ban ner Exchanges
· Ban ner Exchanges
· Joi n Banner Exchange
· Joi n Banner Exchange
· Lin king To Us
· Lin king To Us
· Top sites
· Top sites
· Web Links
· Web Links
· Web rings
· Web rings

Site Info

· Abo ut the Owner
· Abo ut the Site
· Abo ut the Site
· Abo ut UFT_PHP
· Abo ut UFT_PHP
· Abo ut You
· Awa rds
· Awa rds
· Ban ned Stuff
· Ban ned Stuff
· Cop yright
· Cop yright
· Leg al Information
· Leg al Information
· Mod ifications Installed
· Mod ifications Installed
· Sea rch Results
· Sea rch Results
 
UFT Community

Omega13a's Corner Forums

 
Vote For Us
 
Ads


Filter Functions

XLI. Filter Functions

Introduction

This extension serves for validating and filtering data coming usually from some insecure source such as user input.

The following filters currently exist, be sure to read the Filter Constants section for information that describes the behavior of each constant:

Table 1. Existing filters

IDNameOptionsFlagsDescription
FILTER_VALIDATE_INT"int" min_range, max_range FILTER_FLAG_ALLOW_OCTAL, FILTER_FLAG_ALLOW_HEX Validates value as integer, optionally from the specified range.
FILTER_VALIDATE_BOOLEAN"boolean"   Returns TRUE for "1", "true", "on" and "yes", FALSE for "0", "false", "off", "no", and "", NULL otherwise.
FILTER_VALIDATE_FLOAT"float"  Validates value as float.
FILTER_VALIDATE_REGEXP"validate_regexp" regexp   Validates value against regexp, a Perl_compatible regular expression.
FILTER_VALIDATE_URL"validate_url"  FILTER_FLAG_SCHEME_REQUIRED, FILTER_FLAG_HOST_REQUIRED, FILTER_FLAG_PATH_REQUIRED, FILTER_FLAG_QUERY_REQUIRED Validates value as URL, optionally with required components.
FILTER_VALIDATE_EMAIL"validate_email"  Validates value as e_mail.
FILTER_VALIDATE_IP"validate_ip"  FILTER_FLAG_IPV4, FILTER_FLAG_IPV6, FILTER_FLAG_NO_PRIV_RANGE, FILTER_FLAG_NO_RES_RANGE Validates value as IP address, optionally only IPv4 or IPv6 or not from private or reserved ranges.
FILTER_SANITIZE_STRING"string"  FILTER_FLAG_NO_ENCODE_QUOTES, FILTER_FLAG_STRIP_LOW, FILTER_FLAG_STRIP_HIGH, FILTER_FLAG_ENCODE_LOW, FILTER_FLAG_ENCODE_HIGH, FILTER_FLAG_ENCODE_AMP Strip tags, optionally strip or encode special characters.
FILTER_SANITIZE_STRIPPED"stripped"  Alias of "string" filter.
FILTER_SANITIZE_ENCODED"encoded"  FILTER_FLAG_STRIP_LOW, FILTER_FLAG_STRIP_HIGH, FILTER_FLAG_ENCODE_LOW, FILTER_FLAG_ENCODE_HIGH URL_encode string, optionally strip or encode special characters.
FILTER_SANITIZE_SPECIAL_CHARS"special_chars"  FILTER_FLAG_STRIP_LOW, FILTER_FLAG_STRIP_HIGH, FILTER_FLAG_ENCODE_HIGH HTML_escape '"<>& and characters with ASCII value less than 32, optionally strip or encode other special characters.
FILTER_UNSAFE_RAW"unsafe_raw"  FILTER_FLAG_STRIP_LOW, FILTER_FLAG_STRIP_HIGH, FILTER_FLAG_ENCODE_LOW, FILTER_FLAG_ENCODE_HIGH, FILTER_FLAG_ENCODE_AMP Do nothing, optionally strip or encode special characters.
FILTER_SANITIZE_EMAIL"email"   Remove all characters except letters, digits and !#$%&'*+-/=?^_`{|}~@.[].
FILTER_SANITIZE_URL"url"   Remove all characters except letters, digits and $-_.+!*'(),{}|\\^~[]`<>#%";/?:@&=.
FILTER_SANITIZE_NUMBER_INT"number_int"   Remove all characters except digits and +-.
FILTER_SANITIZE_NUMBER_FLOAT"number_float"  FILTER_FLAG_ALLOW_FRACTION, FILTER_FLAG_ALLOW_THOUSAND, FILTER_FLAG_ALLOW_SCIENTIFIC Remove all characters except digits, +- and optionally .,eE.
FILTER_SANITIZE_MAGIC_QUOTES"magic_quotes"  Apply addslashes().
FILTER_CALLBACK"callback" callback function or methodCall user_defined function to filter data.

Requirements

No external libraries are needed to build this extension.

Installation

A short installation note: just type
$ pecl install filter
in your console.

Runtime Configuration

The behaviour of these functions is affected by settings in php.ini.

Table 2. Filter Configuration Options

NameDefaultChangeableChangelog
filter.defaultunsafe_rawPHP_INI_PERDIR 
filter.default_flags PHP_INI_PERDIR 
For further details and definitions of the PHP_INI_* constants, see the Appendix G.

Here's a short explanation of the configuration directives.

filter.default string

Filter all $_GET, $_POST, $_COOKIE and $_REQUEST data by this filter. Original data can be accessed through filter_input().

Accepts the name of the filter you like to use by default. See the existing filter list for the list of the filter names.

filter.default_flags integer

Default flags

Resource Types

This extension has no resource types defined.

Predefined Constants

The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

INPUT_POST (integer)

POST variables.

INPUT_GET (integer)

GET variables.

INPUT_COOKIE (integer)

COOKIE variables.

INPUT_ENV (integer)

ENV variables.

INPUT_SERVER (integer)

SERVER variables.

INPUT_SESSION (integer)

SESSION variables. (not implemented yet)

INPUT_REQUEST (integer)

REQUEST variables. (not implemented yet)

FILTER_FLAG_NONE (integer)

No flags.

FILTER_REQUIRE_SCALAR (integer)

Flag used to require scalar as input

FILTER_REQUIRE_ARRAY (integer)

Require an array as input.

FILTER_FORCE_ARRAY (integer)

Always returns an array.

FILTER_NULL_ON_FAILURE (integer)

Use NULL instead of FALSE on failure.

FILTER_VALIDATE_INT (integer)

ID of "int" filter.

FILTER_VALIDATE_BOOLEAN (integer)

ID of "boolean" filter.

FILTER_VALIDATE_FLOAT (integer)

ID of "float" filter.

FILTER_VALIDATE_REGEXP (integer)

ID of "validate_regexp" filter.

FILTER_VALIDATE_URL (integer)

ID of "validate_url" filter.

FILTER_VALIDATE_EMAIL (integer)

ID of "validate_email" filter.

FILTER_VALIDATE_IP (integer)

ID of "validate_ip" filter.

FILTER_DEFAULT (integer)

ID of default ("string") filter.

FILTER_UNSAFE_RAW (integer)

ID of "unsafe_raw" filter.

FILTER_SANITIZE_STRING (integer)

ID of "string" filter.

FILTER_SANITIZE_STRIPPED (integer)

ID of "stripped" filter.

FILTER_SANITIZE_ENCODED (integer)

ID of "encoded" filter.

FILTER_SANITIZE_SPECIAL_CHARS (integer)

ID of "special_chars" filter.

FILTER_SANITIZE_EMAIL (integer)

ID of "email" filter.

FILTER_SANITIZE_URL (integer)

ID of "url" filter.

FILTER_SANITIZE_NUMBER_INT (integer)

ID of "number_int" filter.

FILTER_SANITIZE_NUMBER_FLOAT (integer)

ID of "number_float" filter.

FILTER_SANITIZE_MAGIC_QUOTES (integer)

ID of "magic_quotes" filter.

FILTER_CALLBACK (integer)

ID of "callback" filter.

FILTER_FLAG_ALLOW_OCTAL (integer)

Allow octal notation (0[0_7]+) in "int" filter.

FILTER_FLAG_ALLOW_HEX (integer)

Allow hex notation (0x[0_9a_fA_F]+) in "int" filter.

FILTER_FLAG_STRIP_LOW (integer)

Strip characters with ASCII value less than 32.

FILTER_FLAG_STRIP_HIGH (integer)

Strip characters with ASCII value greater than 127.

FILTER_FLAG_ENCODE_LOW (integer)

Encode characters with ASCII value less than 32.

FILTER_FLAG_ENCODE_HIGH (integer)

Encode characters with ASCII value greater than 127.

FILTER_FLAG_ENCODE_AMP (integer)

Encode &.

FILTER_FLAG_NO_ENCODE_QUOTES (integer)

Don't encode ' and ".

FILTER_FLAG_EMPTY_STRING_NULL (integer)

(No use for now.)

FILTER_FLAG_ALLOW_FRACTION (integer)

Allow fractional part in "number_float" filter.

FILTER_FLAG_ALLOW_THOUSAND (integer)

Allow thousand separator (,) in "number_float" filter.

FILTER_FLAG_ALLOW_SCIENTIFIC (integer)

Allow scientific notation (e, E) in "number_float" filter.

FILTER_FLAG_SCHEME_REQUIRED (integer)

Require scheme in "validate_url" filter.

FILTER_FLAG_HOST_REQUIRED (integer)

Require host in "validate_url" filter.

FILTER_FLAG_PATH_REQUIRED (integer)

Require path in "validate_url" filter.

FILTER_FLAG_QUERY_REQUIRED (integer)

Require query in "validate_url" filter.

FILTER_FLAG_IPV4 (integer)

Allow only IPv4 address in "validate_ip" filter.

FILTER_FLAG_IPV6 (integer)

Allow only IPv6 address in "validate_ip" filter.

FILTER_FLAG_NO_RES_RANGE (integer)

Deny reserved addresses in "validate_ip" filter.

FILTER_FLAG_NO_PRIV_RANGE (integer)

Deny private addresses in "validate_ip" filter.

Table of Contents
filter_has_var -- Checks if variable of specified type exists
filter_id -- Returns the filter ID belonging to a named filter
filter_input_array -- Gets multiple variables from outside PHP and optionally filters them
filter_input -- Gets variable from outside PHP and optionally filters it
filter_list -- Returns a list of all supported filters
filter_var_array -- Gets multiple variables and optionally filters them
filter_var -- Filters a variable with a specified filter

Total Hits: 0

Powered by PHPNukePage Protected By Copyscape. Do Not CopyNukeSentinel ProtectedPowered by PEARPowered by PECL

© 2000, 2001, 2002 Trek Archive, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 United Federation of Trek.
Omega's Corner is © 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 omega13a.
Star Trek®, Star Trek: The Next Generation®, Star Trek: Deep Space Nine®, Star Trek: Voyager®, Enterprise®, and Star Trek: Enterprise® are registered trademarks of Paramount Pictures and Viacom. All Star Trek material found on this site is for promotional purposes only, and not personal or financial gain. No infringements on their copyrights is intended.
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.


ROR Sitemap Google Sitemap

PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.6469 Seconds
Server Load: 8.75
Queries: 33 (0.1330 seconds)
Included 110 files
253 classes defined
46 interfaces defined
0 classes loaded using __autoload()
2,760 functions defined
4,464 constants defined

:: subBlack phpbb2 style by spectre :: PHP-Nuke theme by www.nukemods.com ::

This Website Is Best Viewed In Mozilla Firefox 0.9+
You Are Currently Using

UFT's Webring of Sci-Fi and Fantasy
UFT's Webring of Sci-Fi and Fantasy
Previous site : Random : Next site : List sites
Powered by PHP-Ring
Psychology News
Scitrek webring
Scitrek webring
Previous site : Random : Next site : List sites
Powered by .PHP-Ring
Psychology News
robots.txt
Contributors Contact Us