hey friends need a little help in lavalair , i m faced with problem of lot fake n multiple ids ids in my site so pls can anyone give me the code so tht users with one ip address cant make any more ids , or same browsers cant register another id , hve searched the forums but cant find it
users with same ip address or same browser cant make two ids , lavalair
Started on the old forum in December 2011 · view the original in the archive · old links redirect here
TL;DR · summary of 30 replies
- Warning: Cannot modify header information - headers already sent is due to output being started before login.php.
- For email validation, registration settings should be set to "Required" and the genVerificationCode function should be called after a successful registration.
- Verify.php will not send an email if the token in the querystring is invalid.
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
this will end up with you losing members as there will be people using same ip and browser as another member
^Agree. Still many mobile networks use shared IP and almost all users have same IP from that network. So you will ultimately ban that network. Better add email verification
Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in
use cookies or session instead of identifying user by ip or browser....
mirror wrote: hmm email validation i had asked earlier in this forum but wasnt able to make it working , searched forum also but didnt find anything for lavalair , pls if anyone hve it , it would b a great help
Its simple to make. But I dont like lavalair, so won't like to make it
Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in
I tell you how to do it, you implement it. Create a table with three fields, (id, userid, verification_code). id just for giving primary key, in userid, give the username or id no of the users' table and a hash of a randomly generated string in verification_code. Also add one bool field in user's table say 'verified' and put 0 as default. Now when new user register, email him link to verification page with its verification code in querystring and in verification page, if hash is valid, just update the field of 'verified' in user tables and remove entry from verification table. You need to update login process also. If user is unverified, don't let it login. This is that simple.
Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in
timo wrote: use cookies or session instead of identifying user by ip or browser....
eg: on login:
$month = 30 * 60 * 24 * 60 + time();
setcookie('reg', 1, $month);
on register:
if(!isset($_COOKIE['reg'])){
//can reg code here
}else{
echo 'Sorry but you are already registered here <br/>';
}
and if browser doesn't support cookies ... no harm is done 🙂
aaaaaaaa m not able to put ur above words in working code ksg91 bro , 🙁 m not tht good in coding as whatever i hve learnt is through online tutorials n w3school , m not a professional but just doing it for my hobby but i cant take the harrassment of some really good users at the hand of peoples with fake ids who just spoil the site name , so i would like to implement tht email validation thing suggested .
Added after 2 minutes:
thanks something else bro any help with email validation thing
Here are updated files. Check if working. I was actually going to sleep and saw your post and made this in sleepy state and in hurry in 10 min so no idea about consistency, so please verify the name consistency I have put enough comments to make if self explaining.
Updated the code in login.php so that if user is not verified, cookies won't be set. Now call the genVerificationCode function when user is registered and pass the unique id of user as argument to this function. And create a verify.php page and call verifyUser() function on that page. Add these two functions in core.php file. Also added one field in ibwf_users table and one more table for verification.
Let me know if you are facing any problem.
Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in
the amount of modifying to the script to properly and securely stop users creating multiple id's per ip/browser is painstakingly time-consuming might as well code a script from scratch as i tried and gave up doing it to my new lavalair script i was coding
i just ended up adding a staff validation system with a improved browser and ip detection, that did the job for me
getting following errors. bro .
1.Warning: Cannot modify header information - headers already sent by (output started at /home//public_html/1234/core.php:2599) in /home//public_html/1234/login.php on line 19
2.in verify.php m getting invalid token
no email is sent so pls help (Now call the genVerificationCode function when user is registered and pass the unique id of user as argument to this function. ) i think m not able to do this properly, one more thing wht shud i keep my registration settings to , enabled or validation required , . if all goes well it will b like a CHRISTMAS GIFT for me
Did you edit login.php file? Because it seems some text is being outputted from core.php and then login.php is setting cookies. Registration settings won't effect this. If user has not verified his email, he won't be able to login. Beware, if you are altering your existing user table, do not forget to set verified=1 for all rows. you will get error for verify.php if the token in the querystring is invalid
Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in
m working in sub domain all the edits so just a single user is registered there , login.php i replaced with the one u gave , shud i hve to edit core also where the register form goes to register.php so tht it goes to verify.php after user enters the data , i added the tables as u told n two extra functions in core
no. You should not redirect user to verify.php page. Just modifiy the core.php functions I wrote as per your details and then user will receive email with the link of verification. And I hope, your host has not disabled the mail() function. Function for genVefificationCode() should be called when it says that user registered successfully
Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in