TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Advanced PHP Programming (http://www.talkphp.com/advanced-php-programming/)
-   -   Extra IP account. (http://www.talkphp.com/advanced-php-programming/4922-extra-ip-account.html)

tearsofthesun 09-01-2009 01:16 AM

Extra IP account.
 
Well, i was trying to find a way to keep track of how many account my user's have and display. here is the code i have.

PHP Code:

<?php
$aka3 
$_SERVER['REMOTE_ADDR'];
$multi mysql_query("SELECT * FROM members WHERE aka3 = '$aka3'")or die(mysql_error());
if (
$multi >1){
}
while(
$row mysql_fetch_array($multi)){
echo 
$row['setname'];
}
?>

This code is actually working to a certain extent. the problem is it only display MY extra accounts i have to me.

I want it to display other people that have the extra account.

adamdecaf 09-01-2009 03:03 AM

Also, you will not be able to view their accounts because the script will grab and use your IP address. You could create a log of the IP addresses and then manually search the DB(s) or save a log of every search.

tearsofthesun 09-01-2009 04:51 AM

Can someone show me how to do that real fast? or will that be a hassle?

TheOnly92 09-01-2009 09:28 AM

What are you actually trying to prevent? Multi-accounts or account sharing?

Village Idiot 09-01-2009 01:28 PM

Quote:

Originally Posted by tearsofthesun (Post 28222)
Can someone show me how to do that real fast? or will that be a hassle?

http://lmgtfy.com/?q=php+prevent+multiple+accounts

I'm pointing you to this link becuase that is where I would go to answer your question.

tearsofthesun 09-01-2009 07:25 PM

Quote:

Originally Posted by TheOnly92 (Post 28228)
What are you actually trying to prevent? Multi-accounts or account sharing?

Sort of :)

TheOnly92 09-02-2009 07:17 AM

Well, both require different methods to prevent...

If you need to prevent same person having multiple accounts, just check for those with same IP address. If you need to prevent same account being shared by people, then you will have to log each IP and check if there are 2 different IP logins simultaneously.

Before providing you with more precise solutions, which are you actually trying to prevent?

tearsofthesun 09-02-2009 11:04 AM

I'm trying to prevent the same person from having multiply accounts.


All times are GMT. The time now is 01:56 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0