I am creating a fast web application that should send a php message from PHP code. cURL seems to be a tool to work with, but it's hard for me to understand enough to make it work.
The documentation for the API I'm dealing with is here . In particular, I want to use the simple GET-based SMS notification registered here . The last resource claims that the GET API is simple:
http:
And indeed, if I type the following URL in the browser, I will get the expected results:
http:
Now I am trying to create the same effect in php. Here is my attempt:
<html>
<body>
<?php
$num = '13634859126';
$message = 'some swanky test message';
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, "http://sms2.cdyne.com/sms.svc/SimpleSMSsend?PhoneNumber=".urlencode($num)."&Message=".urlencode($message)."&LicenseKey=2345987342583745349872");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
?>
</body>
</html>
- PHP , , php apache . , . - , ?
: ... .