2017-05-19 5 views
-2

http://simsimi.com/getRealtimeReq?uuid=VbQqwsQ3qiCw1T04VrrFQzBBlkfZibg3YFkbWz6VquZ&lc=id&ft=1&reqText=Eh+jelek&status=WWie in PHP json 'iyas'

Wie Wert erhalten von respSentence

Im php lang mit^_^

+0

Sehr schlecht Frage finden Sie hilft [Wie fragen] (https://stackoverflow.com/help/how-to-ask) – WilomGfx

+0

'“ {"status": 200, "respSetence" 11 \ ':" respSentence "}" 'ist nicht gültig json. – Naga

+0

Sorry, das weiß ich. Aber, ich benutze Web-Stackoverlow von Mobile. Und ich bin schlecht Englisch, ich hoffe du kannst mir helfen. –

Antwort

0

" {"status":200,"respSentence" 11 \: "respSentence"} "` ist nicht gültig json. verwenden Sie einige Online-Sites Ihre json zu validieren und versuchen, wie diese,

$json = '{"status":200,"respSentence" :"iyas"}'; 
$array = json_decode($json, true); 
echo $array ['respSentence']; 
+0

http://simsimi.com/getRealtimeReq?uuid=VbQqwsQ3qiCw1T04VrrFQzBBlkfZibg3YFkbWz6VquZ&lc=id&ft=1&reqText=Eh+jelek&status=W Wie bekommt man Wert von respSentence? –

+0

'$ json = file_get_contents ('http://simsimi.com/getRealtimeReq?uuid=VbQqwsQ3qiCw1T04VrrFQzBBlkfZibg3YFkbWz6VquZ&lc=id&ft=1&reqText=Eh+jelek&status=W'); $ array = json_decode ($ json, true); echo $ array ['respSentence']; '- Versuchen Sie es. – Naga

+0

Ich benutze das und Ergebnis: Null –

0

Sie können versuchen, mit file_get_contents und json_decode PHP-Funktionen

$url = "http://simsimi.com/........"; 
$data = file_get_contents($url); 
$json = json_decode($data, true); 
echo $json ['respSentence']; 

hoffen, dass es