Captcha hulp nodig

Gestart doorShahiem25 reacties45 weergaven

26 berichten · pagina 1 van 2

Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb een captcha script van erik gekregen maar nu geeft hij aan bij registreren:
De afbeelding .... kan niet worden wergeeven omdat , hij fouten bevat.

Hoe los je dit op:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Content-type: image/png"[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$im[/COLOR] [COLOR= #007700]=[/COLOR] imagecreate[COLOR= #007700]([/COLOR][COLOR= #0000BB]150[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]30[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$wit[/COLOR] [COLOR= #007700]=[/COLOR] imagecolorallocate[COLOR= #007700]([/COLOR][COLOR= #0000BB]$im[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]255[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]255[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]255[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$tekens[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]5[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]7[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$code[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/for"]for[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]<=[/COLOR] [COLOR= #0000BB]$tekens[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]++)
{[/COLOR]

    [COLOR= #0000BB]$code[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #0000BB]$chr[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/chr"]chr[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]65[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]90[/COLOR][COLOR= #007700]));[/COLOR]
    imagettftext[COLOR= #007700]([/COLOR][COLOR= #0000BB]$im[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]12[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700](-[/COLOR][COLOR= #0000BB]30[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]30[/COLOR][COLOR= #007700]), ([/COLOR][COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]*[/COLOR] [COLOR= #0000BB]20[/COLOR][COLOR= #007700]),[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]13[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]30[/COLOR][COLOR= #007700]),[/COLOR] imagecolorallocate[COLOR= #007700]([/COLOR][COLOR= #0000BB]$im[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]200[/COLOR][COLOR= #007700]),[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]200[/COLOR][COLOR= #007700]),[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]200[/COLOR][COLOR= #007700])),[/COLOR] [COLOR= #DD0000]verdana.ttf[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$chr[/COLOR][COLOR= #007700]);

}[/COLOR]

[COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$code[/COLOR][COLOR= #007700];[/COLOR]

imagepng[COLOR= #007700]([/COLOR][COLOR= #0000BB]$im[/COLOR][COLOR= #007700]);[/COLOR]
imagedestroy[COLOR= #007700]([/COLOR][COLOR= #0000BB]$im[/COLOR][COLOR= #007700]);[/COLOR]
?>
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
heb je het bestand verdana.ttf ook gekregen van Erik ? emoErik is nogal dom namelijk biggrin
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hij doet het alsnog niet.confused
0
Erik

Lid

Berichten
7.109
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb verdana.ttf gegeven ja. emo
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Sla het bestand eens op als blaat.txt en open hem eens met kladblok; welke foutmelding zie je dan?
Hier werkt hij wel namelijk.

edit:
je hebt eigenlijk niet eens de rechten om hem te gebruiken, maar dat terzijde emo
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Lennard schreef:
je hebt eigenlijk niet eens de rechten om hem te gebruiken, maar dat terzijde emo
lol emo ghed
0
Berichten
9.969
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Lennard schreef:
Sla het bestand eens op als blaat.txt en open hem eens met kladblok; welke foutmelding zie je dan?
Hier werkt hij wel namelijk.

edit:
je hebt eigenlijk niet eens de rechten om hem te gebruiken, maar dat terzijde emo
vinden jullie dat erg dan als wij hem gebruiken? want ik heb dat ding ook geript van die GHED source yummie het is niet de veiligste captcha, mensen die kwaad willen kunnen dat toch wel maar het houd de grootste groep tegen.
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Gebruik gewoon re-captcha, heb je met 3 regels code een werkende captcha emo
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Robbert schreef:
vinden jullie dat erg dan als wij hem gebruiken? want ik heb dat ding ook geript van die GHED source yummie het is niet de veiligste captcha, mensen die kwaad willen kunnen dat toch wel maar het houd de grootste groep tegen.
Het is eigendom van Nick, dus doe ermee wat je niet laten kunt, van mij heb je geen last.
0
Berichten
9.969
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Lennard schreef:
Eerdere citaten tonen
Robbert schreef:
vinden jullie dat erg dan als wij hem gebruiken? want ik heb dat ding ook geript van die GHED source yummie het is niet de veiligste captcha, mensen die kwaad willen kunnen dat toch wel maar het houd de grootste groep tegen.
Het is eigendom van Nick, dus doe ermee wat je niet laten kunt, van mij heb je geen last.
mooi, naja van nick zal ik ook wel niks horen, als hij niet eens tijd heeft voor zijn eigen website...
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heb nu recaptcha , maar ik wil
Want anders zie ik de onderkant van mijn content niet.
Registreer je maar op Habboregio.nl , maar vul maar wat in bij captcha.
Dan zie je het.

echo </div>
      <div id="content_bottom"></div>

    </div>;


In

[COLOR= #0000BB]<?php[/COLOR]
 [URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]captcha/recaptchalib.php[/COLOR][COLOR= #007700]);[/COLOR]


 [COLOR= #FF8000]# These are /not/ real keys - you must replace them with your *own* keys[/COLOR]
 [URL="http://www.php.net/define"]define[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]PUBLIC_KEY[/COLOR][COLOR= #007700],[/COLOR]  [COLOR= #DD0000]6LfolAcAAAAAAJ9T9-Drj4-s8IWm-_dMcKXnWDVz[/COLOR][COLOR= #007700]);[/COLOR]
 [URL="http://www.php.net/define"]define[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]PRIVATE_KEY[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]6LfolAcAAAAAAFeaI41CmvpDhr1w-N97M45PLO1O [/COLOR][COLOR= #007700]);[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] recaptcha_get_html[COLOR= #007700]([/COLOR] PUBLIC_KEY [COLOR= #007700]);[/COLOR]
  
     [COLOR= #FF8000]# Did the user fail the captcha test?[/COLOR]
                    [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]=[/COLOR] null[COLOR= #007700];[/COLOR]

                    [COLOR= #FF8000]# This is where we process the users response. We dont
                    # do this when the form is initially displayed - only
                    # when the user submits it.[/COLOR]
                    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"recaptcha_response_field"[/COLOR][COLOR= #007700]]) {[/COLOR]
                        [COLOR= #0000BB]$response[/COLOR] [COLOR= #007700]=[/COLOR] recaptcha_check_answer[COLOR= #007700]([/COLOR] 
                            PRIVATE_KEY[COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]],[/COLOR]
                            [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]recaptcha_challenge_field[/COLOR][COLOR= #007700]],[/COLOR]
                            [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]recaptcha_response_field[/COLOR][COLOR= #007700]]
            
                

                        );[/COLOR]
                        
         [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR][COLOR= #0000BB]$resp[/COLOR][COLOR= #007700]->[/COLOR]is_valid[COLOR= #007700]) {[/COLOR]
   [COLOR= #FF8000]// What happens when the CAPTCHA was entered incorrectly[/COLOR]
   [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"U heeft de (re)captcha fout ingevuld."[/COLOR] [COLOR= #007700].[/COLOR]
              
        [COLOR= #DD0000]"(reCAPTCHA said: "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$resp[/COLOR][COLOR= #007700]->[/COLOR]error [COLOR= #007700].[/COLOR] [COLOR= #DD0000]")"[/COLOR][COLOR= #007700]);[/COLOR]
                          [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</div>
      <div id="content_bottom"></div>

    </div>[/COLOR][COLOR= #007700];
    
 }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
   [COLOR= #FF8000]// Your code here to handle a successful verification[/COLOR]
   [COLOR= #007700]}[/COLOR]
                        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR] [COLOR= #0000BB]$response[/COLOR][COLOR= #007700]->[/COLOR]is_valid [COLOR= #007700]) {[/COLOR]
                            [COLOR= #FF8000]# The user passed the reCAPTCHA test: form submission should continue
                            # Your other form validation logic should go here.
                        
                            # For example
                            # ... validate user input ...
                            # ... store form data in a database ...
                            # ... redirect to thank you page[/COLOR]
                                                              [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</div>
   
                        
                        }
                        else {
                            # The user failed the reCAPTCHA test so we need
                            # to fill in the error message and re-try the
                            # form submission
                                                              echo [/COLOR][COLOR= #007700]<[/COLOR]/div[COLOR= #007700]>
      <[/COLOR]div id[COLOR= #007700]=[/COLOR][COLOR= #DD0000]"content_bottom"[/COLOR][COLOR= #007700]><[/COLOR]/div[COLOR= #007700]>

    <[/COLOR]/div[COLOR= #007700]>[/COLOR][COLOR= #DD0000];
                            $error = $response->error;
                                              echo [/COLOR][COLOR= #007700]<[/COLOR]/div[COLOR= #007700]>
      <[/COLOR]div id[COLOR= #007700]=[/COLOR][COLOR= #DD0000]"content_bottom"[/COLOR][COLOR= #007700]><[/COLOR]/div[COLOR= #007700]>

    <[/COLOR]/div[COLOR= #007700]>[/COLOR][COLOR= #007700];
                        }
                    }[/COLOR]
                
                    [COLOR= #FF8000]# Display the reCAPTCHA challenge. The first time
                    # through $error will be null. [/COLOR]

                    [URL="http://www.php.net/echo"]echo[/URL] recaptcha_get_html[COLOR= #007700]([/COLOR] PUBLIC_KEY[COLOR= #007700],[/COLOR] [COLOR= #0000BB]$error[/COLOR] [COLOR= #007700]);[/COLOR]
    
                ?>
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Jij doet wel iets heel raars..

mijn captcha:

<tr>
            <td>Captcha:<td>
        </tr>
        <tr>
            <td> [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] recaptcha_get_html[COLOR= #007700]([/COLOR][COLOR= #DD0000]####[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$error[/COLOR][COLOR= #007700]);[/COLOR] ?>
        </tr>


Mijn check:

$capResp = recaptcha_check_answer(####, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
                if (!$capResp->is_valid) 
                {
                    $Fout= U heeft de (re)captcha fout ingevuld;
                }
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Voor wat is dat dan?
En hoe doe je 1 email per ip, En ik krijg soms gebruikers die gebruikersnaam registreren met dddddddddddd

Zal ik die verwijderen , of kan ik ze laten staan?
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Dat is captcha
Door te kijken of er een row is met de IP van de gebruiker
Die kan je laten staan, zijn gewoon mensen die je site willen bekijken, maar geen zin hebben een goede naam te bedenken.
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja ik heb ook captcha , maar jij zei: Je doet wel iets heell raars.
Wat doe ik raar danemoEn wat is de code van rowyummie
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