For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > November 2005 > Anti Robo script Help









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Anti Robo script Help
skuddo@gmail.com

2005-11-17, 9:55 pm

i installed this new mod on to my phpBB2 forum and it all works great
exept for the antirobotic script it came with. For some reason the
"contole image" won't show up, there forth no one can enter it to be
registerd.

Heres the code:

$key = isset($HTTP_GET_VARS['l']) ? intval($HTTP_GET_VARS['l']) : 0;
$letter = $userdata['session_robot'][$key];
if (file_exists( phpbb_realpath( $images['alphabet_' . $letter] ) ))
{
header("Expires: " . gmdate( "D, d M Y H:i:s", time()-3600*24 ) . "
GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header('Content-type: image/gif');
readfile( phpbb_realpath($images['alphabet_' . $letter] ) );
}

Connector5

2005-11-18, 3:55 am

Either run a phpinfo(); or run 'php -m' from the console to make sure GD is
installed.

GD is required to generate the image.


<skuddo@gmail.com> wrote in message
news:1132285361.976356.295060@g49g2000cwa.googlegroups.com...
> i installed this new mod on to my phpBB2 forum and it all works great
> exept for the antirobotic script it came with. For some reason the
> "contole image" won't show up, there forth no one can enter it to be
> registerd.
>
> Heres the code:
>
> $key = isset($HTTP_GET_VARS['l']) ? intval($HTTP_GET_VARS['l']) : 0;
> $letter = $userdata['session_robot'][$key];
> if (file_exists( phpbb_realpath( $images['alphabet_' . $letter] ) ))
> {
> header("Expires: " . gmdate( "D, d M Y H:i:s", time()-3600*24 ) . "
> GMT");
> header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
> header("Cache-Control: no-cache, must-revalidate");
> header("Pragma: no-cache");
> header('Content-type: image/gif');
> readfile( phpbb_realpath($images['alphabet_' . $letter] ) );
> }
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com