Unfamiliar Posted January 13, 2006 Share Posted January 13, 2006 I need a fix for this code so it displays other peoples service host <? $hostname = gethostbyaddr "60.228.82.14"; echo $hostname; ?> Quote Link to comment Share on other sites More sharing options...
zq29 Posted January 13, 2006 Share Posted January 13, 2006 Please read the description of the Core PHP Hacking forum, your post is not related at all. Please do be careful where you post in future, moving you topic to a more suitable forum... Quote Link to comment Share on other sites More sharing options...
corbin Posted March 8, 2006 Share Posted March 8, 2006 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) Quote Link to comment Share on other sites More sharing options...
greycap Posted March 8, 2006 Share Posted March 8, 2006 [!--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"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.