Difference between revisions of "Nobots.php"
From Organic Design wiki
m |
m |
||
| Line 15: | Line 15: | ||
header( "Location: http://" .$_SERVER['HTTP_HOST'].'/No+Bots!' ); | header( "Location: http://" .$_SERVER['HTTP_HOST'].'/No+Bots!' ); | ||
exit; | exit; | ||
| + | } | ||
} | } | ||
} | } | ||
?> | ?> | ||
Revision as of 05:47, 3 March 2006
<?
- Add an "I am a human" checkbox to stop spambots for a while
if ( $event == 'view' ) { $article = preg_replace( "/(Your email\\*:.+?)<\\/tr>/is",
"$1<input type='checkbox' name='xwSpecies' value='meat'>Yes I'm a meat creature",
$article ); $article = str_replace( '(new users only)', '(new users only - no robots!)', $article ); } else { xwSetProperty( $properties, 'xpath:/properties:view', $tTitle ); if ( $_REQUEST['wpCreateaccount'] ) { if ( !isset($_REQUEST['xwSpecies'] ) { header( "Location: http://" .$_SERVER['HTTP_HOST'].'/No+Bots!' ); exit; } } } ?>



