I am trying my best to describe my problem. For a client PC, I am reading a file (Via ::ReadFile) and uploading i tto a PHP server (HTTP upload). I am receiving this string in that PHP via following file code and saving in hard disk:
<?php
// body contains sent data here
$body = file_get_contents('php://input',FILE_TEXT);
echo "<script language= 'JavaScript'>alert(' . $body . ');</script>";
$today = date("dmY-Gis");
$name = $today . ".log";
//$body = utf8_encode($body);
//$body = "\xEF\xBB\xBF".$body;
$f = fopen($name, "wb");
fwrite($f, $body);
fclose($f);
php?>
Now, I have a string sending as follows: выфпвыфп Notepad
But this PHP script is saving it as ???????? Notepad
Seems english strings are captured correctly, but non - English string is not collected
Can any one have idea.
Above two are same problem but none gave any solutions that worked for me.