如何使用 url 解析来自 cellcom 的响应?
how to parse response from cellcom using that url?
我正在尝试从我的 php 脚本中读取此 url:
http://test.cellpay.com.np:8181/cellcom?FN=123&fromMobile=01670746301&phoneNumber=01670746301&PIN=123456&amount=0
请先加载 url,检查响应并告诉我该怎么做。
我尝试了以下方法:
file_get_contents
simplexml_load_string
simplexml_load_file
CURL
在所有情况下都失败了。
我已保存 xml 并将其上传到
http://vtopup.tk/1.xml
我能读懂这个,但看不懂原版。
请帮我。我厌倦了搜索和应用...
谢谢。
已经过测试并且可以正常工作。
<?php
$url = 'http://test.cellpay.com.np:8181/cellcom?FN=ATW&fromMobile=testuser&phoneNumber=01670746301&PIN=z2ag&amount=0';
$xml = simplexml_load_file($url) or die("feed not loading");
var_dump($xml);
!!!!!!!!!!!!!!!!!!!!!
以上就是 php 个版本
我从 PHP 5.4.27 开始尝试,没有用....
终于从 PHP 5.6.3 开始尝试,它有效。如此简单而神奇。
感谢Veenex and file_get_contents returns empty string
为了所有的努力。
谢谢大家,非常感谢。
我正在尝试从我的 php 脚本中读取此 url:
http://test.cellpay.com.np:8181/cellcom?FN=123&fromMobile=01670746301&phoneNumber=01670746301&PIN=123456&amount=0
请先加载 url,检查响应并告诉我该怎么做。
我尝试了以下方法:
file_get_contents
simplexml_load_string
simplexml_load_file
CURL
在所有情况下都失败了。 我已保存 xml 并将其上传到
http://vtopup.tk/1.xml
我能读懂这个,但看不懂原版。 请帮我。我厌倦了搜索和应用...
谢谢。
已经过测试并且可以正常工作。
<?php
$url = 'http://test.cellpay.com.np:8181/cellcom?FN=ATW&fromMobile=testuser&phoneNumber=01670746301&PIN=z2ag&amount=0';
$xml = simplexml_load_file($url) or die("feed not loading");
var_dump($xml);
!!!!!!!!!!!!!!!!!!!!! 以上就是 php 个版本 我从 PHP 5.4.27 开始尝试,没有用.... 终于从 PHP 5.6.3 开始尝试,它有效。如此简单而神奇。
感谢Veenex and file_get_contents returns empty string 为了所有的努力。
谢谢大家,非常感谢。