Reputation: 2179
How do i get the result from provided URL without opening the browser using php programming/AJAX.
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 next process.
-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
Upvotes: 0
Views: 490
Reputation: 3142
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;
?>
Upvotes: 1