First of all... thanks for trying to help...

I'll show the full piece of code I made :
$file = "http://www.ivan.ivao.org/whazzup.txt";;

$fp = fsockopen($file, 80);



if (!$fp) {
echo "does not open";
} else {
echo $fp;   ---------> Here is what I say it does't return anything. This
line is just to figure out what fsockopen() returns.
while (!feof($fp)) {
echo fgets ($fp,500);
}
fclose ($fp);
}

Thanks again
Alfonso

======================================

What do you mean "it returns nothing?"

fsockopen() returns a file handle.  Was the file handle valid, i.e., not 0?
If true, then you must READ from the opened file handle.

Please, be more specific in your error discussion.

---- Original Message -----
From: "Alfonso Ballesteros" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 17, 2002 6:58 AM
Subject: Re: [PHP] fopen error


I'm still stuck with this...

Using fsockopen() I'm not able to open the remote file.

I use

$file = "http://www.xxx.xxx/file.txt";;
$fp = fsockopen($file, 80);

and $fp returns nothing...

Any idea?

Alfonso

"Marek Kilimajer" <[EMAIL PROTECTED]> escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> if allow_url_fopen is not on, you can still use fsockopen(), and no it
> doesn't affect security, if you don't open files based on unchecked user
> input.
>
> Alfonso Ballesteros wrote:
>
> >Hello
> >
> >I'm a newcomer to PHP and I wish to know how to get the contents of a
file
> >located in an URL if the parameter allow_url_fopen is "no value" in the
> >php.ini file.
> >
> >Does this parameter, if is "on", affect the security of the server?
> >
> >Thanks in advance
> >
> >Alfonso
> >
> >
> >
> >
> >
>



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






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

Reply via email to