Home > Backend Development > PHP Tutorial > PHP调用Http短信接口(返回值为xml),在PHP中怎么提取出来里面的值

PHP调用Http短信接口(返回值为xml),在PHP中怎么提取出来里面的值

WBOY
Release: 2016-06-13 12:46:59
Original
1082 people have browsed it

PHP调用Http短信接口(返回值为xml),在PHP中如何提取出来里面的值?
这个Http接口返回的值为下面这种样式


status-------返回状态值:成功返回Success 失败返回:Faild
message--------------返回信息提示:见下表

我运行PHP后在网页上出来:Sucess 预付费
页面上是$result = file_get_contents($gateway);

echo '返回结果'.$result;

请问怎样用俩个变量分别接受success 和预付费这俩个值?求高手解答!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template