I tried, but I receive the new error:

Warning: fopen(): php_network_getaddresses: getaddrinfo failed: Name or
service not known in /home/manageme/public_html/try-test/fopen-test-http.php
on line 7

Warning: fopen(http://www.management.kiev.ua/MO/main.php/): failed to open
stream: Permission denied in
/home/manageme/public_html/try-test/fopen-test-http.php on line 7

Why there are errors in this simple command? What are
'php_network_getaddresses' and 'getaddrinfo' ?

Thanx,
Taras V. Panchenko.


"Eric Bolikowski" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> "Taras Panchenko" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > I have 2 questions:
> > 1) why gethostbyname() does not resolve my host name into IP?
> > 2) why fopen() (and file()) does not open an external (URL) file via
http?
> > Please, see my example below:
> > ------------------
> >
>
http://www.management.kiev.ua/try-test/fopen-test-http.php -----------------
> > --
> > <?
> > echo gethostbyname("www.management.kiev.ua");
> >
> > $h=fopen("http://www.management.kiev.ua/MO/main.php";, "r");
> > echo fread($h,200);
> > ?>
>
> Try this rather(maybe it works):
>
> <?php
>
> $fp=fopen("http://www.management.kiev.ua/MO/main.php/";, "r");
>  echo fread($fp,200);
> ?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to