Results 1 to 5 of 5

Thread: What is a PHP Filter?

  1. #1
    Join Date
    Aug 2006
    Posts
    221

    What is a PHP Filter?

    Hi friends,
    I have done some basic things in coding of PHP. You can say that I have used the PHP to some extent but I am not an expert in that.!! Last time your help was really grateful. So thought that this time also I should ask the doubt to you guys.!! Now I am stuck in the filters that are used in PHP. Please explain me what are PHP Filters.?? How they are used in PHP.? Expecting the same help as last time.!
    AMD Sempron 2800+ @ 2Ghz
    Asus A7V8X-LA
    120Gb Seagate barracuda 7200Rpm Ultra-ATA 100
    Elixir 512mb DDR Pc3200 (Soon 1Gb)
    Club 3D Radeon 9600 256Mb
    Lite-On Cd & Dvd writer combo
    IDE-Dvd drive
    400w Psu
    Windows Xp Pro Sp2
    Advent Wireless Mouse & Keyboard.

  2. #2
    Join Date
    Aug 2006
    Posts
    235

    Re: What is a PHP Filter?

    Generally we use the term filter if we want to validate or verify something. Similarly, a PHP filter is used to validate and filter data coming from insecure sources. If you want to do the testing, you can validate and filter user input or custom data which is an important part of any web application. For making the data easier and faster, the PHP filter extension is designed. If you are using the PHP filter core module, that will add the ability to include PHP code in posts. Users with the proper permission may include custom PHP code within a page of the site, through the PHP filter.
    3.2 (northwood)
    2gig ram
    ATI AIW X800xt 256mb
    Gigabyte GA-8knxp 875p Chipset
    Optiwrite 8X DVD Burner
    Win XP PRO Sp2 (Works Perfectly)
    2 SATA Raptor 74gig Raid 0
    2 7200 IDE 320gig HD

  3. #3
    Join Date
    Jul 2006
    Posts
    286

    Re: What is a PHP Filter?

    If you are not new to the programming language then you should know that almost all web applications depend on external input. By using filters you can be sure your application gets the correct input type. The thing that you should keep in mind is that, you should always filter all external data. You can say that input filtering is one of the most important application security issues. An external input is the input that comes from a user or another application.
    IF you hate me, please don't mention it. I know who hates me and who doesn't. You really do not have to make fun of people....

  4. #4
    Join Date
    Jul 2006
    Posts
    442

    Re: What is a PHP Filter?

    If you want to filter a variable in your coding, you would have to use one of the following filter functions :
    • filter_var() - This function is used to filters a single variable with a specified filter.
    • filter_var_array() - This function is useful for filtering several variables with the same or different filters.
    • filter_input - This function is used to get one input variable and filter it.
    • filter_input_array - By using this function you can get several input variables and filter them with the same or different filters.
    "When they give you ruled paper, write the other way..." J.R.J.

  5. #5
    Join Date
    Feb 2008
    Posts
    1,852

    Re: What is a PHP Filter?

    If you need to validate an integer using the filter_var() function, you can use the following code which explains the same thing :
    PHP Code:
    <?php
    $int 
    234;

    if(!
    filter_var($intFILTER_VALIDATE_INT))
      {
      echo(
    "Integer is not valid");
      }
    else
      {
      echo(
    "Integer is valid");
      }
    ?>

Similar Threads

  1. How to setup IP Filter & MAC filter on Huawei MT841?
    By Eas!war in forum Networking & Security
    Replies: 1
    Last Post: 04-03-2012, 04:06 PM
  2. Scene filter GUI on vlc
    By Alfiee in forum Windows Software
    Replies: 5
    Last Post: 09-07-2011, 10:19 AM
  3. Filter Tag In Html
    By technika in forum Software Development
    Replies: 5
    Last Post: 01-02-2010, 04:41 PM
  4. IP Filter
    By Adrina_g in forum Software Development
    Replies: 3
    Last Post: 07-12-2009, 02:44 PM
  5. Picollator filter : Automatic adult content filter
    By monsitj in forum Windows Software
    Replies: 1
    Last Post: 29-01-2009, 07:07 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,523,242.08955 seconds with 17 queries