Blog Designed by Pediredla Kishore Kumar Indian Entertainer: How to Get visitors IP address

Slideshow

  • Cute Kajal Agarwal

    Telugu Movie WP
  • The hottest lips are seeing red

    Actress WP
  • 17 Cheating Pictures Collection

    Adults Only
  • 10 Unique Houses From Around the World

    Scenery Wallpapers
  • Small Birds have big Love

    Birds WallPapers
  • Cute Kiss

    Love Wallpapers
  • Black Taj Mahal

    Truth About Blak Taj Mahaal
  • India Festival Art painting

    Oil Pinting Wp
  • beautiful sceneries wallpapers

    Scenery WP
  • Cat And Bird Cute Friendship

    Birds WP
  • ed ed 6 Most Popular Ways Of Couple Hugging

    Adults WP
  • Indian Village Paintings

    Oil Pinting Wp
  • Awsome moments on well & girls

    Oil Painting Wp
  • hansika visits simbu birthday party

    Actress WP


How to Get visitors IP address

How to get visitors IP address? If you want to get your web site visitor’s IP address then PHP provides you complete solution for this. I made a function to get IP address of visitor.
PHP Codes

.
.
.
.
.
.
function visitorip() {
    if (getenv(‘HTTP_CLIENT_IP’)) $ip = getenv(‘HTTP_CLIENT_IP’);
    elseif (getenv(‘HTTP_X_FORWARDED_FOR’))    $ip = getenv(‘HTTP_X_FORWARDED_FOR’);
    elseif (getenv(‘HTTP_X_FORWARDED’)) $ip = getenv(‘HTTP_X_FORWARDED’);
    elseif (getenv(‘HTTP_FORWARDED_FOR’)) $ip = getenv(‘HTTP_FORWARDED_FOR’);
    elseif (getenv(‘HTTP_FORWARDED’)) $ip = getenv(‘HTTP_FORWARDED’);
    else $ip = $_SERVER['REMOTE_ADDR'];
    return $ip;
}

echo “Your IP address is “.visitorip();
?>

In result web site visitor’s ip address will appear. In example above i made a function named visitorip() will check all conditions for getting ip and will return ip address. echo command of PHP will receive ip address will display on page.


0 comments to "How to Get visitors IP address"

Post a Comment

Total Pageviews

Clock

Popular Posts

My site Traffic

Web hosting for webmasters