Example #1
0
//            ->setTemplateNew(true)
        ;
        switch ($_POST['template_mode']) {
            case '1':
                $sms->setTemplateNew(true);
                break;
            case '2':
                $sms->setTemplateForceUpdate(true);
                break;
            default:
        }
        var_dump($sms->send());
        break;
    case 'text':
        $sms = new SmsSOAPClient($config);
        $sms
            ->registerNumber($_POST['recipient_number'])
            ->registerContent($_POST['sms_content'])
        ;
        var_dump($sms->send());
        break;
    default:
}
} catch (Exception $e) {
    echo $e->getCode() . ':: ' . $e->getMessage();
}
?>

<form method="post" action="" name="soap_tester" id="form">
    <ul>
        <li><label>Tryb pracy</label>
            <select name="env_type">
Example #2
0
        var_dump($sms->send());

        } catch (Exception $e) {

            if ($e->getCode() >= 500) {
                echo "OMG to blad systemu!!";
            } else {
                echo "spoko, to tylko my spapralismy";
            }

            echo $e->getCode() . ' ' . $e->getMessage();
        }
        break;
    case 'text':
        $sms = new SmsSOAPClient($config);
        $sms
            ->registerNumber('+48 514 035 090')
            ->registerContent('to jest tresc')
        ;
        var_dump($sms->send());
        break;
    default:
}

?>



<?php
echo "OK";