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

30 replies · 1,928 views · started 14 years ago · 1 min read

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.

6 participants
mirror Developer · 108 posts #1

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

something else Fellow · 2,296 posts #2

this will end up with you losing members as there will be people using same ip and browser as another member

mirror Developer · 108 posts #3

oh okay then any function to stop users from creating multiple ids ,

ksg91 Developer · 162 posts #4

^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

mirror Developer · 108 posts #5

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

ksg91 Developer · 162 posts #7

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

mirror Developer · 108 posts #8

oh dear (pray) arnage bro had once tried to help with email validation but it didnt work , (bang)

ksg91 Developer · 162 posts #9

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

something else Fellow · 2,296 posts #10

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 🙂

mirror Developer · 108 posts #11

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

arnage Lead · 811 posts #12

Zip and upload login and register pages with users table from that script. I'll show you what and how to do tomorrow, as Ksg91 said its really easy. 😉 But it ain't gonna stop savages totally.

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
mirror Developer · 108 posts #13

my register.php . core n login with user tables

ok arnie bro . here they are .

Attachments: files.zip
ksg91 Developer · 162 posts #14

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

Attachments: files.zip
amylee Principal · 1,092 posts #15

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

mirror Developer · 108 posts #16

u mean to say tht in staff tools u hve powers to find all users using same ip or browser anything like tht, wow thts wonderful

thnks ksg9 bro i will give it a try n let u know

mirror Developer · 108 posts #17

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

ksg91 Developer · 162 posts #18

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

mirror Developer · 108 posts #19

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

ksg91 Developer · 162 posts #20

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

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close