艾米檢查該響應:
{"status":"success","reason":"","device":"","version":"","email":"[email protected]","id":"123132","points":"1502","offers":"true","hyprmx":"true","prizes":"true","visit":"true","html":"<!doctype html><html lang='en'><head></head><body><p style='font-weight:900;'>received account_id: 123132</p><p>received device: </p><p>received version: </p></body></html>"}
HTML是也存在於這樣的:
<!doctype html><html lang='en'><head></head><body><p style='font-weight:900;'>received account_id: 123132</p><p>received device: </p><p>received version: </p></body></html>
因爲這個網站的,與json_decode()
它顯示:
<br />
<b>Parse error</b>: syntax error, unexpected 'en' (T_STRING), expecting ',' or ')' in <b>[...][...]</b> on line <b>3</b><br />
當我刪除它並json_decode()
它,它給:
stdClass Object
(
[status] => success
[reason] =>
[device] =>
[version] =>
[email] => [email protected]
[id] => 123132
[points] => 1502
[offers] => true
[hyprmx] => true
[prizes] => true
[visit] => true
[html] =>
)
我將刪除charset = utf-8設置,以便您可以看到輸出內容 –
感謝大家的幫助。現在,我的所有用戶都可以從API中看到他們的免費禮品卡獎品:) –