Downloading utf-8 encoded files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I want to download UTF-8 encoded kml files from a website. I have written a
script that automatically downloads KML file. Problem is that some of the
utf-8 charc are distrubed after saving file on windows. below is the script.


.
.
.

  $handle = fopen($link, "rb");

  $handle2= fopen("kml/$i.kml","w");

  $contents = '';
  while (!feof($handle)) {
    $contents = fread($handle, 8192);
    fwrite($handle2, $contents);
  }
  fclose($handle);
  fclose($handle2);
.
.
.
.

Also, there is another problem.Downloading file using the above script,
downloads incomplete file, means some of the information is skipped and file
size is also small.

Help would be appriciated

--
Regards
Fahad Pervaiz
www.ecommerce-xperts.com

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux