Deprecated function eregi()

Gestart doorZjegher9 reacties95 weergaven

10 berichten · pagina 1 van 1

Zjegher

Lid · Topicstarter

Berichten
356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Deprecated: Function eregi() is deprecated in /home/kdesign/domains/.....nl/public_html/includes/connect.php on line 54

if(eregi($foutbezig,$locatie)) {


wie kan me helpen alvast bedankt
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
http://nl3.php.net/eregi

This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.

Functie bestaat niet meer.
0
Zjegher

Lid · Topicstarter

Berichten
356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
dat word dan preg_match maar ik weet niet hoe ik dat hier op moet toepassen
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Post eens iets meer van je script dan.
0
Zjegher

Lid · Topicstarter

Berichten
356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
$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 Injection
IP-Adres: $_SERVER[REMOTE_ADDR]","From: $sitename <$noreply>");
exit();

} 
}
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Gewoon zoiets?

[COLOR= #0000BB]<?php
$fout[/COLOR]    [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"mysql"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]")"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]";"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"}"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"INSERT"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"DROPTABLE"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"TRUNCATE"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"DROP"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"UPDATE"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"COOKIE"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"ENV"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"FILES"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"GET"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"POST"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"REQUEST"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"SERVER"[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fout[/COLOR] [COLOR= #007700]AS[/COLOR] [COLOR= #0000BB]$waarde[/COLOR][COLOR= #007700]) {[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"#"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$waarde[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"#"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_URI[/COLOR][COLOR= #007700]])) {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Internet fout, ip adres doorgegeven aan domein houder."[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"$adminmail"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"Mysql Injection"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"Mysql Injection
        IP-Adres: $_SERVER[REMOTE_ADDR]"[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]"From: $sitename <$noreply>"[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
    } 
}[/COLOR]
?>
0
Zjegher

Lid · Topicstarter

Berichten
356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
dan verschijnen de volgende 2 errors

Warning: preg_match(): No ending delimiter } found in /home/kdesign/domains/.nl/public_html/includes/connect.php on line 56

Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /home/kdesign/domains/l.nl/public_html/includes/connect.php on line 56

miss is het beter als je de hele script ziet .
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Oh lol het was volgens mij nog vroeg.

Weet ff niet meer hoe het moet in een array, zal eens kijken.
Zo misschien?
0
Zjegher

Lid · Topicstarter

Berichten
356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Warning: preg_match(): Compilation failed: unmatched parentheses at offset 0 in /home/kdesign/domains/rshandel.nl/public_html/includes/connect.php on line 40

hmm ik ga maar weer is even op internet rond zoeken dan toch bedankt !
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Verzin eens een betere titel zeg! Kan je best hoor!

$pattern = "/".$waarde."/";
    if(preg_match($pattern, $_SERVER[REQUEST_URI])) {


Kijken of dit werkt, en zo niet, echo eens $pattern, en je weet hopelijk meer.
En waaroms ta je zomaar te gokken of de mail is verstuurd? Controleer gewoon met een nette if-statement of de mail is verstuurd, i.p.v. het zelf maar te bepalen.

Foutafhandeling is gewoon belangrijk.
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren