Now Hiring: Are you a driven and motivated 1st Line IT Support Engineer?

Resend messages- PHP Integration

Resend messages- PHP Integration

  • </pre>
    <pre class="prettyprint prettyprinted"><span class="kwd">try</span> <span class="pun">{</span>
        <span class="com">// Resend a message using the ID.</span><span class="pln">
        $msg </span><span class="pun">=</span><span class="pln"> resendMessageByID</span><span class="pun">(</span><span class="lit">1</span><span class="pun">);</span><span class="pln">
        print_r</span><span class="pun">(</span><span class="pln">$msg</span><span class="pun">);</span>
    
        <span class="com">// Get messages using the Group ID and Status.</span><span class="pln">
        $msgs </span><span class="pun">=</span><span class="pln"> resendMessagesByGroupID</span><span class="pun">(</span><span class="str">'LV5LxqyBMEbQrl9*J$5bb4c03e8a07b7.62193871'</span><span class="pun">,</span> <span class="str">'Failed'</span><span class="pun">);</span><span class="pln">
        print_r</span><span class="pun">(</span><span class="pln">$msgs</span><span class="pun">);</span>
        
        <span class="com">// Resend pending messages in last 24 hours.</span><span class="pln">
        $msgs </span><span class="pun">=</span><span class="pln"> resendMessagesByStatus</span><span class="pun">(</span><span class="str">"Pending"</span><span class="pun">,</span> <span class="kwd">null</span><span class="pun">,</span> <span class="kwd">null</span><span class="pun">,</span><span class="pln"> time</span><span class="pun">()</span> <span class="pun">-</span> <span class="lit">86400</span><span class="pun">);</span>
        
        <span class="com">// Resend pending messages sent using SIM 1 of device ID 8 in last 24 hours.</span><span class="pln">
        $msgs </span><span class="pun">=</span><span class="pln"> resendMessagesByStatus</span><span class="pun">(</span><span class="str">"Received"</span><span class="pun">,</span> <span class="lit">8</span><span class="pun">,</span> <span class="lit">0</span><span class="pun">,</span><span class="pln"> time</span><span class="pun">()</span> <span class="pun">-</span> <span class="lit">86400</span><span class="pun">);</span><span class="pln">
        print_r</span><span class="pun">(</span><span class="pln">$msgs</span><span class="pun">);</span>
    <span class="pun">}</span> <span class="kwd">catch</span> <span class="pun">(</span><span class="typ">Exception</span><span class="pln"> $e</span><span class="pun">)</span> <span class="pun">{</span><span class="pln">
        echo $e</span><span class="pun">-></span><span class="pln">getMessage</span><span class="pun">();</span>
    <span class="pun">}</span></pre>
    <pre>

Leave your thought here

Your email address will not be published.