Clan Adverts

PHP Web Host - Quality Web Hosting For All PHP Applications

 

Server IP and ISP Host

Description: Very simple tutorial for showing ip fo user
Version: 1.0
Added on: 24 February 2007
Author: unkown
Difficulty Level: Very Easy
Views: 670
Detailed Profile

Code:
<?php
$ip = "" . $_SERVER['REMOTE_ADDR'] . "";
$isptc = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$ispoh = preg_split("/./", $isptc);
$xy = count($ispoh);
$x = $xy - 1;
$y = $xy - 2;
$i = $xy - 3;
$ispp = "" . $ispoh[$i] . ".";
$isp = "" . $ispoh[$y] . "." . $ispoh[$x] . "";
echo"<b>ip: $ip</b><br>";
echo"<b>isp: $ispp$isp</b>";
?>


example:

Save as isp.php, and upload in your hosting.
Execute www.yoursite.com/isp.php