I need a correction for my php codings of the following?


$isptc = gethostbyaddr($ip);
$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>";

In this above mentioned codings, i didn’t get the output from $ispp and $isp.


I Got an answers from the following PHP Codings….










<table align="center">
<tr><td>ISP :</td><td><?php echo $isp;?></td></tr>
<tr><td>City :</td><td><?php echo $city;?></td></tr>
<tr><td>State :</td><td><?php echo $state;?></td></tr>
<tr><td>Zipcode :</td><td><?php echo $zipcode;?></td></tr>
<tr><td>Country :</td><td><?php echo $country;?></td></tr>

Answered By – Rajesh

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published