Hi.
I have a problem, wonder if someone give an answer??
The function file() should be identical to readfile(), except that file() returns the file in an arry.
It seems to work fine in txt/html. But when I use file() to get an image (jpg) or other filetypes it will not work. The string taken out of the arry is totally different from the originalfile. And much less.
I would like to use file(), because it allows me to write the file to my server, while readfile() just let me browse it.
Is it possible to get a string from the file $url (http://...), end write it correct to the server?
The two examples below works identical when $url is txt/html. But not else.
<?
$content = implode ('', file ("$url"));
echo $content;
?>
<?
readfile ("$url")
?>
Hope for answer
regards
Karl Sørensen
Norway
http://nettforlaget.net/