Get IP address in CodeIgniter

by Bhumi // Nov 20,2012 // No comment

Get IP address in CodeIgniter

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

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.


Convert RGB to Hex HTML code in PHP

Here, I am going to explain code which is used to get HTML Color Code from RGB( RGB stands for Red, Green, and Blue) Equivalent. READ MORE

To convert PHP array into Javascript array

Sometimes you want to get php array values into javascript as an array. Mostly when you are using ajax. In Ajax , we pass php READ MORE

The Readers’ Poll – June 2013

Chart is a graphical representation of dynamic data and php has very useful chart libraries using it easily create charts in php. So,Here is new READ MORE

To increase Product Imagesize in Opencart

Here,I come with one more new article in Opencart.In this quick article,I am going to share how to increare product image upload size into Opencart. READ MORE

Five Reasons Why You Should Go With PHP

Reasons simply incline us to believe in our decisions. They tend us to work hard to prove our decision as the productive ones. Therefore, you READ MORE

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">