View Single Post
ישן 20-04-07, 15:58   # 1
syn
הוסטסניון
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
הודעות: 1,919

syn לא מחובר  

PHP | אימות של קוד אבטחה

הכנתי קוד אבטחה מתמונה, אני צריך שמישהו ידריך אותי איך אני עושה אימות של הקוד,
אם המשתמש כתב את ה string נכון ב input תדפיס משהו, אם לא תדפיס משהו.

PHP קוד:
<?php
$string 
rand 11111,99999 ) ;
$string str_replace '2''F'$string ) ;
$string str_replace '6''e'$string ) ;
$string str_replace '1''X'$string ) ; 
$string str_replace '7''D'$string ) ; 
$string str_replace '4''h'$string ) ; 
echo 
"<img src='test.php?code=$string' /><br />Code: $string";
echo <<<EOF
<br /><br />enter code pl0x<br />
<form action="hi.php" method="POST">
<input type="text" name="code" size="40">
<input type="submit" value="gogogo" />
</form>
EOF;
?>
  Reply With Quote