This option will reset the home page of this site. Restoring any closed widgets or categories.

Reset

Get IP address using gethostbyname() function

 gethostbyname() is used to get the IP address corresponding to a given Internet host name.

Examples code:

<?php
$ip 
gethostbyname(‘www.mistonline.in’);
echo 
$ip;
?>One way to discover your IP address automatically:
<?php
// need to trim() because whitespace will confuse the name lookup
$myIP gethostbyname(trim(`hostname`));
echo 
$myIP;
?>

VN:F [1.5.7_846]
Rating: 6.5/10 (2 votes cast)
VN:F [1.5.7_846]
Rating: +1 (from 1 vote)

Related posts:

  1. How to get the IP address of the visitor with PHP?
  2. Get IP address using javascript And SSI
  3. MD5 Function and Unique ID in php

7 Comments

  1. BypeWhomypewhz says:

    Sounds cool……………

    VA:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.5.7_846]
    Rating: 0 (from 0 votes)
  2. notapionnaistfsk says:

    hmm nice one…

    VA:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.5.7_846]
    Rating: 0 (from 0 votes)
  3. Bashchuxustahihj says:

    nice website..

    VA:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.5.7_846]
    Rating: 0 (from 0 votes)
  4. MaizelirlMamsrtn says:

    hmm good..

    VA:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.5.7_846]
    Rating: 0 (from 0 votes)
  5. scurcisultusyehz says:

    cool..

    VA:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.5.7_846]
    Rating: 0 (from 0 votes)
  6. Poeveinsek says:

    Good website….

    VA:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.5.7_846]
    Rating: 0 (from 0 votes)
  7. Phil Young says:

    gud one :)

    VA:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.5.7_846]
    Rating: 0 (from 0 votes)

Leave a Reply

Comments (required)

Spam Protected