开发者

How do i get the result from provided URL without opening the browser [Php Code/AJAX]

How do i get the result from provided URL without opening the browser using php programming/AJAX.

This is the url provided by SMS gateway

http://isms.mobiweb.com.my/isms_send.php?un=username&pwd=password&dstno=60168126323&msg=Hi%20Chin...%20Tested%20by%20joe.&type=1&sendid=60132729040

Basically I am using cron-job scrip to start processing and send SMS to the recipients. What I want is just the result from the URL(Without opening the browser for gateway api) and proceed the to nex开发者_开发百科t process.

The api result will be

-1000   UNKNOWN ERROR
-1001   AUTHENTICATION FAILED
-1002   ACCOUNT SUSPENDED / EXPIRED
-1003   IP NOT ALLOWED
-1004   INSUFFICIENT CREDITS
-1005   INVALID SMS TYPE
-1006   INVALID BODY LENGTH (1-900)
-1007   INVALID HEX BODY
-1008   MISSING PARAMETER
-2000   SUCCESS

Thank you


You can use the function file_get_contents to fetch the url.

<?php
$result = file_get_contents('http://isms.mobiweb.com.my/isms_send.php?un=username&pwd=password&dstno=60168126323&msg=Hi%20Chin...%20Tested%20by%20joe.&type=1&sendid=60132729040');
echo $result;
?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜