ludah Posted March 8, 2016 Share Posted March 8, 2016 please I have this after i sent an sms. === HTTP Request === 0 : HTTP/1.1 401 Unauthorized Keep-Alive : true Content-Length : 14 Content-Type : application/json; charset=utf-8 Server : Microsoft-IIS/8.5 WWW-Authenticate : Bearer error="invalid_token" Date : Tue, 08 Mar 2016 14:10:41 GMT Connection : close Request Method :POST Content : Content=this+is+from+a+function&From=FBR-PACE&RegisteredDelivery=true&To=%2B233246022602&Direction=out Accept : application/json === HTTP Response === Receive url :http://api.smsgh.com/v3/messages/ Status : 201 POST /v3/messages/ HTTP/1.1 Host: api.smsgh.com Authorization: Basic Y2V4Z3hwZXg6dnZkcWVwenM= Accept: */* Content-Length: 102 Content-Type: application/x-www-form-urlencoded {"Rate":1,"MessageId":"437d6a60-87a8-4551-b751-c05eed4f5849","Status":0,"NetworkId":"62001"}array(0) { } please how can i convert this to php array. Quote Link to comment https://forums.phpfreaks.com/topic/300949-converting-json-to-php/ Share on other sites More sharing options...
requinix Posted March 8, 2016 Share Posted March 8, 2016 That response is all messed up. JSON and a PHP dump? Wrong Content-Type? Or maybe it's just what you posted here? json_decode the response body. Quote Link to comment https://forums.phpfreaks.com/topic/300949-converting-json-to-php/#findComment-1531784 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.