Get IP address in CodeIgniter

Get IP address in CodeIgniter

Share: Share on Facebook4Share on LinkedIn4Tweet about this on Twitter0Share on Google+2Share on Reddit0Buffer this pageDigg thisEmail this to someoneShare on StumbleUpon0Share on TumblrPin on Pinterest0Print this page

CodeIgniter is great framework by its simplicity because structure of the CodeIgniter framework is clear and flexible.

Let’s understand the function used to get user’s ip in CodeIgniter.

CodeIgniter offers a way to retrieve the user’s IP address with using a in-built function in CodeIgniter.

If the IP address isn’t valid, function will return 0.0.0.0.

Next,is about To validate an IP address and you should use have a function for that also which will return TRUE or FALSE.

The above function validates the IP automatically.

To retrieve a user agent

To determine the user agent of the user, you can use the below code in CodeIgniter. It will return the user agent of the user’s web browser; if not available, it will
return FALSE.

Is this information useful? What other tips would you like to read about in the future?

Thanks for reading and feel free to share your thoughts, don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Share: Share on Facebook4Share on LinkedIn4Tweet about this on Twitter0Share on Google+2Share on Reddit0Buffer this pageDigg thisEmail this to someoneShare on StumbleUpon0Share on TumblrPin on Pinterest0Print this page

Leave a Reply

Your email address will not be published. Required fields are marked *

Most Popular Posts

GoTo statement in PHP

Posted on 3 years ago

Bhumi

Table layout using DIV tags

Posted on 2 years ago

Bhumi

Mysql String Function FIND_IN_SET( )

Posted on 3 years ago

Bhumi

Post via e-mail in WordPress

Posted on 3 years ago

Bhumi

New Features in MySQL 5.6

Posted on 3 years ago

Bhumi