I am pretty sure the error is caused by the german characters you are sending unencoded. When you do it by browser the URL will be encoded automatically, but not automatically by your PHP-script.
Use rawurlencode for this :
$inhalt = simplexml_load_file('http://maps.googleapis.com/maps/api/geocode/xml?'.
'address='.rawurlencode($strasse).',+'.
rawurlencode($plz).'&sensor=true');