我想從我的PHP腳本讀取這個網址:如何使用該url解析來自cellcom的響應?
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
我可以讀這一點,但不是原來的一個。 請幫幫我。我厭倦了搜索和應用...
謝謝。
SimpleXML肯定是最簡單的方法。當你寫'所有情況下都失敗'時,當你調用'simplexml_load_file('http://test.cellpay.com.np:8181/cellcom?FN=ATW&fromMobile=testuser&phoneNumber=01670746301&PIN=z2ag&amount=0 ');' – Saeven 2015-02-06 19:01:10
布爾(假),雖然網址是有效的,但它的工作http://vtopup.tk/1.xml的情況下 – Shuhail 2015-02-06 19:04:35
@Shuhail然後你有另一個問題,也許有什麼是「破」在你身邊, – VeeeneX 2015-02-06 19:12:44