You are here: conflicting gethostbyname behaviors « PHP Programming Language « IT news, forums, messages
conflicting gethostbyname behaviors

Posted by yawnmoth on 09/26/92 11:47

I seem to be getting conflicting gethostbyname behavior on different
servers. Before going into detail, here's the script I'm using:

<?
$address = $HTTP_SERVER_VARS['REMOTE_ADDR'];
$rev = implode('.',array_reverse(explode('.', $address)));

$lookup = "$rev.l1.spews.dnsbl.sorbs.net";
echo gethostbyname($lookup);
echo '<br />';
echo $lookup;
?>

On server A, the output I get is as follows:

176.115.112.70.l1.spews.dnsbl.sorbs.net
176.115.112.70.l1.spews.dnsbl.sorbs.net

On server B, the output I get is this:

195.69.95.204
176.115.112.70.l1.spews.dnsbl.sorbs.net

As I understand it, server A's output is the correct output - not
server B's.

Server A is running PHP Version 4.4.1 with Apache/1.3.34 while server B
is running PHP Version 4.3.11 with Apache/2.0.52. I'd like the above
script, however, to work just as well on server A as it does on server
B.

Any ideas as to how I might go about doing this or what the problem is?
Any help would be appreciated - thanks!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация