CodeIgniter Forums
i need block a proces using the ip address - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: i need block a proces using the ip address (/thread-27357.html)



i need block a proces using the ip address - El Forum - 02-08-2010

[eluser]tnathos[/eluser]
Hi.. in my app i get the ip address from the user using $this->input->ip_address() but i have a dude..

if i need restrict an process, for example what my user only send a email in one day... and this user are in the enterprise computer... whit $this->input->ip_address() i restrict only this user or all pc the network enterprise?


i need block a proces using the ip address - El Forum - 02-08-2010

[eluser]2think[/eluser]
Hi Tnathos,
If I understand you clearly, you may have a few users in one company coming in from a single ip address? If you want to block a particular user, there are a couple possible solutions that come to mind. I'm sure more knowledgeable users will be able to highlight the plus/minus of them and others.

For starters, you can use some type of registration and set a value in their session or just use session data by itself.

I'm not an expert on sessions in PHP or in general but from my understanding, if you store the session data in the database and combine with something identifying that particular user, it should be easier to determine him/her sending one email per day. Of course, that would also depend on your session's lifespan.

Second, you could simply have a table that checks for all/specific users who have sent an email that day and if they are already in there, don't allow it to send (form/model validation).

Hope this helps.


i need block a proces using the ip address - El Forum - 02-08-2010

[eluser]tnathos[/eluser]
yes.. understand but the users can explorate the site. whitout register and login.. and use some functions.. so.. i think what its posible restrict for this users.. what dont are login... the use some functions..


i need block a proces using the ip address - El Forum - 02-09-2010

[eluser]bretticus[/eluser]
Restricting access based on IP only is a very bad idea. If you are going to enforce some kind of ACL, you need an authentication system that is geared per user.