我正在使用活动监视器的 api并尝试以json
它应该执行的格式检索响应。我回应了回应,这是一个例子:
string(342) "HTTP/1.1 400 Bad Request
Server: csw
Cache-Control: private, s-maxage=0
X-CS-Node: 25
Content-Type: application/json; charset=utf-8
P3P: CP="OTI DSP COR CUR IVD CONi OTPi OUR IND UNI STA PRE"
Date: Sun, 27 Jan 2013 12:35:10 GMT
Connection: close
Content-Length: 66
{"Code":250,"Message":"List title must be unique within a client"}"
我想得到唯一的最后一行。我怎样才能做到这一点 ?(我试图用空白来爆炸响应,但它没有改变任何东西)。
编辑:文档在这里,我调用一个方法method()
,返回响应$response = method()
并运行echo($response)