Jump to content

Simple but confusing


Unfamiliar

Recommended Posts

  • 1 month later...

Try something like:

<?
$remoteip=$_SERVER['REMOTE_ADDR'];
$hostname = gethostbyaddr $remoteip;
  
echo $hostname;
?> 

 

I'm not sure if that will work. I would test it but its very later here and im about to go to bed.

 

(if that doesnt work, try quotes around $remoteip)

[!--quoteo(post=336076:date=Jan 13 2006, 02:07 AM:name=unfamiliar)--][div class=\'quotetop\']QUOTE(unfamiliar @ Jan 13 2006, 02:07 AM) 336076[/snapback][/div][div class=\'quotemain\'][!--quotec--]

I need a fix for this code so it displays other peoples service host

 

<?
$hostname = gethostbyaddr "60.228.82.14";
  
echo $hostname;
?> 

 

echo and print are very unique in that they dont require parans (). Virtually every other function does.

 

you want:

$hostname = gethostbyaddr("60.228.82.14");

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.