what is my ip?

Sometimes you need to know what your external IP (internet protocol) address is. Whether just to know or a part of maintenance. Well, I need it sometimes to check whether I’m being blocked by any website or not. I made a list of how to check our external IP address, check it out!

1. Google Search

The simplest way to check your IP is by doing a Google Search with this keywords : “what is my IP”.

Google will give you your IP address like this: Your public IP address is 202.93.37.81.

Since most of the latest browser available has the ability to do search operation using search bar, or even searching right from the address bar, it will be so easy for you.

2. Web Service

If you don’t have much time to type the phrase “what is my IP”, you might want to bookmark one of the websites below and put it on your bookmark toolbar, so all you have to do is to click the bookmark and wait till the page loaded.

  • www.whatismyip.com
  • www.whatismyipaddress.com
  • www.whatsmyip.org
  • www.ip-address.org

and lot more websites out there with same functionality. What a waste -__-"

3. PHP code

Or if you’re sick of useless page contents of those websites and only need to know your IP address real quick, you may code your own PHP script and put it on your website. Here’s the code:

<?
if (!empty($_SERVER[‘HTTP_CLIENT_IP’]))   //check ip from share internet
    {
      $ip=$_SERVER[‘HTTP_CLIENT_IP’];
    }
    elseif (!empty($_SERVER[‘HTTP_X_FORWARDED_FOR’]))   //to check ip is pass from proxy
    {
      $ip=$_SERVER[‘HTTP_X_FORWARDED_FOR’];
    }
    else
    {
      $ip=$_SERVER[‘REMOTE_ADDR’];
    }
echo $ip;
?>

Copy the code above, paste it on notepad, and then save it as a .php file (eg. myip.php) and upload it to your web server, so you can access it like this: www.yourwebsite.com/myip.php .

One example of the live site that will give you only your IP address is : http://www.whatismyip.org.

Storing Images/Binary Files to mySQL in PHP

It is possible for us to store/save our images (binary files) into a mySQL database in PHP. In this article, we will discuss about “how to store images, audio, or another binary files into mySQL database with PHP script”. But, before we continue to the further step, you might want to consider some reason of why we should and why we shouldn’t store binary files in a database:

Reasons to store your images (binary files) in a database:

  1. Storing in a database allows better security for your files and images.
  2. Eliminates messy directory and file structures (this is especially true when users are allow to contribute files).
  3. Files/Images can be stored directly linking to user or advertiser information. Read More

.htaccess Tricks: #1 – Definition

.htaccess Tips n Trick
.htaccess Tips n Trick

.htaccess definition:
Apache server software provides distributed (i.e., directory-level) configuration via Hypertext Access files. These .htaccess files enable the localized fine-tuning of Apache’s universal system-configuration directives, which are defined in Apache’s main configuration file. The localized .htaccess directives must operate from within a file named .htaccess. The user must have appropriate file permissions to access and/or edit the .htaccess file. Further, .htaccess file permissions should never allow world write access — a secure permissions setting is “644”, which allows universal read access and user-only write access. Finally, .htaccess rules apply to the parent directory and all subdirectories. Thus to apply configuration rules to an entire website, place the .htaccess file in the root directory of the site.
Read More

write less do more

PHP
PHP

How to save the resource in our project code? Should we repeat writing the same code in every page/file? We can save a lot of our time and resource by putting the same code or lines into a function or procedure.

In some programming language, such as Pascal, Batch, C, PHP, etc., we can make a single special file where we can store our functions and procedure, also some constant. Read More