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

Manage Contacts- PHP Integration

Manage Contacts- PHP Integration

  • </pre>
    <pre class="prettyprint prettyprinted"><span class="kwd">try</span> <span class="pun">{</span>
        <span class="com">// Add a new contact to contacts list 1 or resubscribe the contact if it already exists.</span><span class="pln">
        $contact </span><span class="pun">=</span><span class="pln"> addContact</span><span class="pun">(</span><span class="lit">1</span><span class="pun">,</span> <span class="str">"+11234567890"</span><span class="pun">,</span> <span class="str">"Test"</span><span class="pun">,</span> <span class="kwd">true</span><span class="pun">);</span><span class="pln">
        print_r</span><span class="pun">(</span><span class="pln">$contact</span><span class="pun">);</span>
        
        <span class="com">// Unsubscribe a contact using the mobile number.</span><span class="pln">
        $contact </span><span class="pun">=</span><span class="pln"> unsubscribeContact</span><span class="pun">(</span><span class="lit">1</span><span class="pun">,</span> <span class="str">"+11234567890"</span><span class="pun">);</span><span class="pln">
        print_r</span><span class="pun">(</span><span class="pln">$contact</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. Required fields are marked *