Welcome Guest, Not a member yet? Register   Sign In
i need block a proces using the ip address

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?

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.

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..

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.

Theme © iAndrew 2016 - Forum software by © MyBB