|
Posted by xhe on 02/23/07 02:10
if we use this one
if(fopen("http://www.ntc.gov.au","r"))
{
echo "success";
}else
{
echo "false";
}
result is false.
with fsockopen, we can ONLY check "www.ntc.gov.au", and we can not
check if the whole url is reachable or not.
It seemed that fsockopen is only valid to check host name, while not
the whole ip string.
Any good idea to check the who ip string instead of just host name?
thanks.
On Feb 22, 8:30 pm, Rik <luiheidsgoe...@hotmail.com> wrote:
> xhe <hexuf...@gmail.com> wrote:
> > The first line is the IP address that I am checking.
> > It is
> > $url="http://www.ntc.gov.au/ViewPage.aspx?page=A02400304500100020";
>
> Call me insane, I see no IP address. Do you mean a DNS, or a URL?
> DNS:
> <http://www.php.net/pareseurl>
> <http://www.php.net/gethostbyname>
>
> URL checking should normally be possible with fopen(), if allow_url_fopen
> is enabled.
> --
> Rik Wasmus
Navigation:
[Reply to this message]
|