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)

Link to comment
Share on other sites

[!--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");

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.