Hey guys, I have a registration form. Users are registering via that form. But I want to save user's IP address to Database too. How can I get IP address of user ? Thank you in advance
Thank you for your reply . Can I just write it like this : update table_name set Ip_add=$_SERVER['REMOTE_ADDR'] ?
Yeah although most IPS are dynamic meaning they change on a scheduled time period... most IPS DO NOT change according to the time frame of the lease. As long as my modem is online at the time of the lease renewal I can keep an IP up to 12 months before the DNS servers force a change. So it's not entirely pointless. I worked for an ISP for 6 months learned lots of nice tricks.
so on dialup, you're going to stay connected for 12 months just to keep your ip address? it's pointless like i said. each time someone with a dialup connection disconnects and reconnects, their ip address is different in most cases. why else would you log ip addresses anyways? i mean it'd definitely useful to log ip's for various reasons. to check against fraud and all of that stuff with geo location and what not. all i am saying is that it's not going to be the same everytime so i hope he isn't basing his login system on it.
How can I do adminstrative side of managing users ( blocking some users to access the site, if there will be any need ?) I thought If I will have IP adress, they will be responsible what they do at site. What can you offer to manage this kind of problems , if not to log IP addresses of users . Thank you
then yeah, blocking their ip address would be the route to go. maybe even a mask of their ip address since it's not the whole thing that changes, just part of it. though this will result in others being banned as well but it's the price you pay. if not just ban the one ip address and then if it changes or renews and they return, ban them again.
lmfao I'm on on dialup ANSI... I'm on premium cable.... piss on dialup... but anywho as for blocking IP addresses, you can simply use a .htaccess file and include the following: <Files .htaccess> order allow,deny deny from all </Files> then you just add the ip like this: deny from xxx.xxx.xxx.xxx or to deny an entire range just add: deny from xxx (e.g. 172 will deny any ip beginning with 172, which is typically used by AOL)
Throw back the handling of directories of your website by using an .htaccess...entering them by hand directly in the file would be quite a job if you have a lot of users. From your php file, you can forward them to the user part of the site if they are allowed to, or to any other banned page you want them to view. This method is cool, I think, because you can set up some kind of user/groups who have access to sections of your site depending of their settings. It's easy to do all of that directly in php