Hey all,
I've got a big problem. When downloading remote websites using fopen() [sourcecode below] text-files get downloaded correctly however images can't get displayed (they get downloaded, but they're mostly smaller than their original counterparts). The most strange thing, however, is that when testing locally it works (Windows XP Home // Apache), but on the remote server it doesn't (SuSE Linux // Apache).
Here's the code-snippet:
<?php
if (!file_exists($dest)) {
$fp_ori = fopen ($src, "rb");
$fp_new = fopen ($dest, "wb");
if ($fp_ori && $fp_new) {
while (!feof ($fp_ori)) {
fwrite($fp_new,fgets($fp_ori, 1000000));
}
fclose ($fp_ori);
fclose ($fp_new);
}
}
?>
Any help would be greatly appreciated.
Best regards,
Raphael Pirker
I've got a big problem. When downloading remote websites using fopen() [sourcecode below] text-files get downloaded correctly however images can't get displayed (they get downloaded, but they're mostly smaller than their original counterparts). The most strange thing, however, is that when testing locally it works (Windows XP Home // Apache), but on the remote server it doesn't (SuSE Linux // Apache).
Here's the code-snippet:
<?php
if (!file_exists($dest)) {
$fp_ori = fopen ($src, "rb");
$fp_new = fopen ($dest, "wb");
if ($fp_ori && $fp_new) {
while (!feof ($fp_ori)) {
fwrite($fp_new,fgets($fp_ori, 1000000));
}
fclose ($fp_ori);
fclose ($fp_new);
}
}
?>
Any help would be greatly appreciated.
Best regards,
Raphael Pirker