I wrote this short code to output the ping.
But there are umlauts in my output, since i am running this command on a german windows 7 computer, these umlauts (ö,ä,ü) are always visible as ?
in the output.
So i tried to set the locale to de_DE.UTF-8
but this did not helped either.
<?php
header('Content-type: text/plain; charset=utf-8');
$locale= 'de_DE.UTF-8';
setlocale (LC_ALL, $locale);
putenv ('LC_ALL='.$locale);
$result = shell_exec('ping www.google.de');
echo $result;
?>
Snippet from my output:
Ping wird ausgef�hrt f�r www.google.de [173.194.112.248] mit 32 Bytes Daten: