Jump to content
Sign in to follow this  
ludah

converting json to php

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.