Welkom op Scriptkiddies!
Disclaimer - FAQ - Contact - About - Adverteren
  Home   Artikelen   Forum   Topic openen   Chat   Gastenboek   Links   Aanmelden

  CSS   JavaScript   ASP   PHP   Perl


  PromootSnel.nl - Web  Avondzon.nl  habbo-dj-music  scripttrip  De enige echte grati  Tuts.nl | Tutorial C  lord-m.beMeer linkpartners

Magic Quotes GPC verwijderen
Auteur: MijnNaam (lid)
Gepost: 22:10:35 13-07-2004
Stuur prive bericht
En deze functie verwijdert alle magic quote gpc-slashes die werden toegevoegd. Lekker handig, gewoon een keer aanroepen bovenaan je script en je hebt nergens geen last meer van. (Y)
<?php
/*
***************************************************************************
* Function undo_magic_quotes_gpc(), used to remove unwanted slashes done  *
* by magic_quotes_gpc. Usefull if you don't have control on this.         *
* Copyright (C) 2004 The Celestial Celebi.                                *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the   *
* Free Software Foundation; either version 2 of the License, or (at your  *
* option) any later version.                                              *
* This program is distributed in the hope that it will be useful, but     *
* WITHOUT ANY WARRANTY; without even the implied warranty of              *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       *
* General Public License for more details.                                *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.               *
***************************************************************************
*/

/*
***************************************************************************
* @function: undo_magic_quotes_gpc(): (recursively) Removes unwanted      *
* slashes added by the magic_quotes_gpc-setting.                          *
* @param $mGetPostCookieVariable (mixed): The GPC-variable where you want *
*  to remove the slashes from. If this parameter isn't specified, the     *
*  function will automatically remove the slashes of all GPC-variables.   *
* @return mixed: Returns void if called without parameter and string or   *
*  array if called with parameter.                                        *
*-------------------------------------------------------------------------*
* @started on: 8 July 2004 at 20:00:40 by The Celestial Celebi.           *
* @last edited on: 8 July 2004 at 20:01:50 by The Celestial Celebi.       *
* @constructs used: else, if, return.                                     *
* @functions used: array_map, get_magic_quotes_gpc, stripslashes.         *
***************************************************************************
*/

function undo_magic_quotes_gpc($mGetPostCookieVariable '')
{
    if(
$mGetPostCookieVariable == '' && get_magic_quotes_gpc() == 1)
    {
        
$_POST undo_magic_quotes_gpc($_POST);
        
$_GET undo_magic_quotes_gpc($_GET);
        
$_COOKIE undo_magic_quotes_gpc($_COOKIE);
    }
    else
    {
        if(
is_array($mGetPostCookieVariable))
        {
            return 
array_map('undo_magic_quotes_gpc'$mGetPostCookieVariable);
        }
        else
        {
            return 
stripslashes($mGetPostCookieVariable);
        }
    }
}
?>
download het script    




Reacties van leden

Auteur: leendert @ 14-07-2004

test
Auteur: Jacob Slomp @ 16-07-2004

meer commentaar commentaar dan code :|
Auteur: DaddyDJ @ 18-08-2004

nou en
Auteur: Cassy @ 04-04-2005

oke
Auteur: Cassy @ 04-04-2005

@




Gebruikersnaam:
Wachtwoord:

Brochures.nl  gratis criminals...  forum probleem  sql file nodig!  wild west game  script gezocht  wat te denken ove...  rabo internetbank...  oehoe!  site tekoop  koppeling zoek &...

Scriptkiddies telt momenteel 6407 leden, er zijn 359 scripts en er zijn momenteel 5 mensen online waarvan 0 leden.

Hoeveel sites heb jij?
Geen
1
2
5
meer dan 5

Parkeren Schiphol Profielen tip NatuurRampen tip JS-Systems LoveBoyz Ringtones! Woning aanbod Weblog maken
Copyright by Jacob Slomp