You are here: Are there any good solutions for checking the validity of IP address? « PHP Programming Language « IT news, forums, messages
Are there any good solutions for checking the validity of IP address?

Posted by xhe on 02/22/07 21:59

Hi,
I need to program to check the validity of IP address through PHP
Initially I used this one:

$url="http://www.ntc.gov.au/ViewPage.aspx?
page=A02400304500100020";

$fp=fopen($url,"r");
if(!$fp)
{
echo "Failed";
}else
{
echo "success";
}
when I run it, it's output is "Failed",

I then use

$fp=fsockopen($url,80); for second line, and also failed.

This IP address is actually good.
Butwhen I check "www.ntc.gov.au" it is success.

So does that mean by using PHP, we can only check hostname? And if the
IP address is longer and includes the appendix, we can not check it by
PHP?

Or do you have another good solutions?

Thanks in advance.

Frank

 

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

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