Quote:
Originally Posted by cybertooth I think there is an improvement with the registration ... thanks
it would be good if you can share the step 2 with us too ..
this will benefit other members here suffering from spam ..
thanks a lot |
Hi again cybertooth.
I'm glad to hear you see an improvement.
The idea for another version of Step 2 is near the bottom of my post (#109 - quoted below) where it says '~~~~~~~ ANOTHER IDEA ~~~~~~~~'.
Quote:
Originally Posted by newsome Hi cybertooth.
The suggestions I previously provided were for v.9.8.2, thinking that the next 1 or 2 versions would have similar structure of the files I cited. I see that is not the case. I just downloaded v.9.9.5 and there are major differences with respect to registration. So, possibly try this knowing I'm not an expert on sessions nor Smarty (feedback for experts welcomed):
Step 1:
======
At the top of 'templates/yget/register_center.tpl', add the following: PHP Code: {php}
session_start();
$stop_spam_now = time() + 445544; // suggestion: change this variable name and its value
$stop_spam = $stop_spam_now; // suggestion: change this variable name, too
session_register("stop_spam_now");
session_register("stop_spam");
{/php}
Note: Thought process - adding this variable behind the scenes to the registration form template makes using this form a requirement for writing to the database versus a bot circumventing this form and calling the registration functions e.g. using their own form from a different server.
Step 2:
======
In 'register.php' at the top inside of either 'function register_check_errors()' or 'function register_add_user()', check for the presence of that variable's value, else stop processing. For example, add before the global statement: PHP Code: if (!isset($stop_spam) || ($stop_spam != $stop_spam_now)) {
return;
}
Note: Actually, you can do this without using sessions, just using normal php variables
HTH.
P.S. I may not be able to respond right away past tonight as I'll be very busy this entire weekend and possibly Monday --
EDIT:
~~~~~~~ ANOTHER IDEA ~~~~~~~~
This may be a bit more secure for Step 2 (for register.php), again using your own variable names: PHP Code: if (!session_is_registered("stop_spam") || !session_is_registered("stop_spam_now")) {
return;
}
Again, it doesn't matter what value you assign to $stop_spam_now nor $stop_spam. Also, you can just use one of the two variables instead of both. No one should know what variable name(s) you are using -- hopefully, they can't use a program to figure it out either(?). |
If you try it, please let me know how it works.
Thanks.