Total Users Online: 0 üye, 104 guest | Tarih/Saat: 2026-04-30 10:07
 
Function sed_import()
#932
2009-12-28 10:18 GMT  oklu Alnt
Kaan

User is: Online status   Gender_M
Posts: 2772
Ülke: İstanbul - 34
Meslek: Serbest Meslek
Age: 43

Function sed_import()
A part of the Seditio security system, the variable sanitizer.

var sed_import(string name, string source, string filter);

The function sed_import() is an important part of Seditio, it's handling the import and filtering of variables into the script.

- First parameter that's the name of the variable.
If the source is G, P or C, there's no '$'.

- 2nd parameter, it's the source of the variable :

G = Get (from the URL)
P = Post (From the forms)
C = Cookie
D = Direct (this one is to filter only, no import performed)


- 3rd parameter : Filter

INT : Integer
NUM : Numerical
TXT : Text
STX : Simple text (same as text, but no quotes or double quotes allowed)
SLU : Special filter for relative URLs
ALP : Alphanumerical
PSW : Password (max len of 32, and alpnanum)
HTM : Same as NOC, see below
ARR : Array
BOL : Bolean (1 or 0 or TRUE or FALSE)
LVL : LDU level, an integer between 0 and 100
NOC : No COmpare (=no filter)

When you choose a filter, you should always go for the more restrictive, to avoid people inserting malicious values in the URL or the forms or the cookies.


?rnek :

$xg = sed_import('x','G','ALP');
$abc = sed_import('def','P','BOL');
$password = sed_import($pass,'D','PSW');
Konuyla İlgili Diğer Başlıklar
Deprecated: Function eregi() is deprecated
Deprecated: Function eregi_replace() Sorunu Acil!
Alternative Pagination Function
How to fix ‘Function eregi() is deprecated’ in PHP 5.3.0?
function ile görünme sorunu?
Emlak, Oto Galeri, Rent A Car, ?iir, Edebiyat Script Sipari?lerinizi Verebilirsiniz.
Detaylar ??in: kaan@ntka.org

Seditio 170 ?ndir
Capte M?zik ?ndir
Seditio Toolbar ?ndir

 

Powered by Seditio © 2009-2012 All Rights Reserved