GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   What is the code for displaying a visitors host (https://gfy.com/showthread.php?t=254132)

Shoehorn! 03-17-2004 07:09 PM

What is the code for displaying a visitors host
 
I have the code for the IP, but what is the code for displaying the host address? For example, I want to make an error page that says something like "Your username and password have been logged and will be reviewed, your IP address is _________ and your host is _________."

Thanks in advance. :thumbsup

4Pics 03-17-2004 07:10 PM

perl, php, asp or hahahahahahahahahaha?

Shoehorn! 03-17-2004 07:11 PM

Quote:

Originally posted by 4Pics
perl, php, asp or hahahahahahahahahaha?
Sorry, PHP.

reynold 03-17-2004 07:17 PM

sorry i have no idea about that!!

AcidMax 03-17-2004 07:18 PM

PHP Code:

<?php
$hostname 
gethostbyaddr($_SERVER['REMOTE_ADDR']);
  
echo 
$hostname;
?>


$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);

echo $hostname;

(because the php quoting stuff looks really small.)

Shoehorn! 03-17-2004 07:25 PM

Quote:

Originally posted by AcidMax
PHP Code:

<?php
$hostname 
gethostbyaddr($_SERVER['REMOTE_ADDR']);
  
echo 
$hostname;
?>


$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);

echo $hostname;

(because the php quoting stuff looks really small.)

Hmm, doesn't seem to work.

AcidMax 03-17-2004 07:33 PM

http://us2.php.net/manual/en/function.gethostbyaddr.php

bet that works. :)

Shoehorn! 03-17-2004 08:26 PM

Quote:

Originally posted by AcidMax
http://us2.php.net/manual/en/function.gethostbyaddr.php

bet that works. :)

Excellent, thanks a lot. :thumbsup


All times are GMT -7. The time now is 01:19 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123