SMS gateway usage example for PHP

    Send sms

    Getting status of sent sms

    Getting a price of the sms

    Getting current balance



    Send sms:

    <?php $src = '<?xml version="1.0" encoding="UTF-8"?> <SMS> <operations> <operation>SEND</operation> </operations> <authentification> <username></username> <password></password> </authentification> <message> <sender>SMS</sender> <text>Test message [UTF-8]</text> </message> <numbers> <number messageID="msg11">380972920000</number> </numbers> </SMS>'; $Curl = curl_init(); $CurlOptions = array( CURLOPT_URL=>'http://api.atompark.com/members/sms/xml.php', CURLOPT_FOLLOWLOCATION=>false, CURLOPT_POST=>true, CURLOPT_HEADER=>false, CURLOPT_RETURNTRANSFER=>true, CURLOPT_CONNECTTIMEOUT=>15, CURLOPT_TIMEOUT=>100, CURLOPT_POSTFIELDS=>array('XML'=>$src), ); curl_setopt_array($Curl, $CurlOptions); if(false === ($Result = curl_exec($Curl))) { throw new Exception('Http request failed'); } curl_close($Curl); echo $Result; ?>

    Getting status of sent sms*:

    <?php $src = '<?xml version="1.0" encoding="UTF-8"?> <SMS> <operations> <operation>GETSTATUS</operation> </operations> <authentification> <username></username> <password></password> </authentification> <statistics><br> <messageid>msg11</messageid> </statistics> </SMS>'; $Curl = curl_init(); $CurlOptions = array( CURLOPT_URL=>'http://api.atompark.com/members/sms/xml.php', CURLOPT_FOLLOWLOCATION=>false, CURLOPT_POST=>true, CURLOPT_HEADER=>false, CURLOPT_RETURNTRANSFER=>true, CURLOPT_CONNECTTIMEOUT=>15, CURLOPT_TIMEOUT=>100, CURLOPT_POSTFIELDS=>array('XML'=>$src), ); curl_setopt_array($Curl, $CurlOptions); if(false === ($Result = curl_exec($Curl))) { throw new Exception('Http request failed'); } curl_close($Curl); echo $Result; ?>

    * The sms status information will be available in a few minutes



    Getting a price of the sms:

    <?php $src = '<?xml version="1.0" encoding="UTF-8"?> <SMS> <operations> <operation>GETPRICE</operation> </operations> <authentification> <username></username> <password></password> </authentification> <message> <sender>SMS</sender> <text>Test message [UTF-8]</text> </message> <numbers> <number messageID="msg11">380972920000</number> </numbers> </SMS>'; $Curl = curl_init(); $CurlOptions = array( CURLOPT_URL=>'http://api.atompark.com/members/sms/xml.php', CURLOPT_FOLLOWLOCATION=>false, CURLOPT_POST=>true, CURLOPT_HEADER=>false, CURLOPT_RETURNTRANSFER=>true, CURLOPT_CONNECTTIMEOUT=>15, CURLOPT_TIMEOUT=>100, CURLOPT_POSTFIELDS=>array('XML'=>$src), ); curl_setopt_array($Curl, $CurlOptions); if(false === ($Result = curl_exec($Curl))) { throw new Exception('Http request failed'); } curl_close($Curl); echo $Result; ?>

    Getting current balance

    <?php $src = '<?xml version="1.0" encoding="UTF-8"?> <SMS> <operations> <operation>BALANCE</operation> </operations> <authentification> <username></username> <password></password> </authentification> </SMS>'; $Curl = curl_init(); $CurlOptions = array( CURLOPT_URL=>'http://api.atompark.com/members/sms/xml.php', CURLOPT_FOLLOWLOCATION=>false, CURLOPT_POST=>true, CURLOPT_HEADER=>false, CURLOPT_RETURNTRANSFER=>true, CURLOPT_CONNECTTIMEOUT=>15, CURLOPT_TIMEOUT=>100, CURLOPT_POSTFIELDS=>array('XML'=>$src), ); curl_setopt_array($Curl, $CurlOptions); if(false === ($Result = curl_exec($Curl))) { throw new Exception('Http request failed'); } curl_close($Curl); echo $Result; ?>
    We use cookies to provide you with the best experience while using our site Yes, I agree