Beste Leden,
ik stuit dus op de volgende probleem
[align=start]
PHP
Deprecated: Function eregi() is deprecated in /home/kdesign/domains/rshandel.nl/public_html/includes/connect.php on line 54
[/align][align=start]
nou begrijp ik dat deze functie niet meer bestaat en dat ik die moet aanpassen,
[/align]
nou heb ik al heel veel geprobeerd met preg_match maar ik kom er zelf maar niet uit.
kan iemand me hiermee verder helpen.
Alvast Bedankt
PHP
<?php
// This file contains the database access information. This file also establishes a connection to MySQL and selects the database (CrimeAddicted)
// Set the database access information as constants (therefore cannot be changed!)
define ('DB_USER', '****');
define ('DB_PASSWORD', '*****');
define ('DB_HOST', 'localhost');
define ('DB_NAME', '*****');
// Make the connection and then select the database.
$dbc = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() );
mysql_select_db (DB_NAME) OR die ('Could not select the database: ' .mysql_error() );
$adminmail = "";$sitename = "Rsverkoop";$sitelink = "rsverkoop.nl";$siteurl = "http://www.rsverkoop.nl/";$traders = "[email protected] \n ";
$locatie = $_SERVER['REQUEST_URI'];$array = Array();$array[] = "mysql";$array[] = ")";$array[] = ";";$array[] = "}";$array[] = "INSERT";$array[] = "DROPTABLE";$array[] = "TRUNCATE";$array[] = "DROP";$array[] = "UPDATE";$array[] = "COOKIE";$array[] = "ENV";$array[] = "FILES";$array[] = "GET";$array[] = "POST";$array[] = "REQUEST";$array[] = "SERVER";foreach($array As $foutbezig) {if(eregi($foutbezig,$locatie)) {echo "Internet fout, ip adres doorgegeven aan domein houder.";mail("$adminmail","Mysql Injection","Mysql InjectionIP-Adres: $_SERVER[REMOTE_ADDR]","From: $sitename <$noreply>");exit();
} }
/*** saver werken* ©2009+**/function undo_magic_quotes_gpc( $getVars = '' ){ if ($getVars == '' && get_magic_quotes_gpc() == 1) { $_GET = undo_magic_quotes_gpc( $_GET ); $_POST = undo_magic_quotes_gpc( $_POST ); $_COOKIE = undo_magic_quotes_gpc( $_COOKIE ); $_REQUEST = undo_magic_quotes_gpc( $_REQUEST ); } else { if (is_array( $getVars )) { return array_map('undo_magic_quotes_gpc', $getVars); } else { return stripslashes( $getVars ); } }}/*** Hoe gebruik ik dit?** Je zet een $_GET functie bijvoorbeeld zo om: undo_magic_quotes_gpc($_GET['var']);**/
?>
Toon Meer