Results 1 to 3 of 3

Thread: SMS not going

  1. #1
    kshaw661 is offline Member
    Join Date
    Jan 2011
    Location
    India
    Posts
    19

    Default SMS not going

    Hi

    My logic hook not sending the sms here is the code .
    For logic_hook.php


    FOr sendsms.php

    <?php

    $hook_version = 1;
    $hook_array = Array();

    $hook_array['after_save'] = Array();

    /* Added By Kunal on 27th june */
    //$hook_array['after_save'][] = Array(1, 'sendsms', 'custom/modules/Calls/sendsms.php','sendsms', 'sendsms');
    //$hook_array['after_relationship_add'][] = Array(1, 'hookName', 'pathToCustomLogicHookClassFile', 'CustomLogicHookClassName', 'CustomLogicHook');
    $hook_array['after_relationship_add'][] = array(1,'LogCall','custom/modules/Calls/sendsms.php','sendsms','sendsms');
    /* End */

    ?>

    class sendsms{
    function sendsms(&$bean, $event, $arguments){
    //header("Location: http://enterprise.smsgupshup.com/GatewayAPI/rest?method=SendMessage&send_to=8688108128&msg=Wel come%20to%20SMS%20GupShup%20API&msg_type=TEXT&user id=2000060960&auth_scheme=plain&password=aWvHTfs88 &v=1.1&format=text");
    echo '<script>window.location="http://www.enterprise.smsgupshup.com/GatewayAPI/rest?method=SendMessage&send_to=8688108128&msg=Wel come%20to%20SMS%20GupShup%20API&msg_type=TEXT&user id=2000060960&auth_scheme=plain&password=aWvHTfs88 &v=1.1&format=text"</script>';
    }

    }

    How can this work
    By mistake i write it two times ....
    please check this one
    please help me
    Thank You
    Kunal
    Last edited by kshaw661; 2011-06-29 at 05:15 AM.
    Kuanl Shaw
    Software Engineer
    penguinCRM pvt. ltd.
    Hyderabad, India

  2. #2
    mattt is offline Sugar Community Member
    Join Date
    May 2011
    Location
    Brisbane, Australia
    Posts
    19

    Default Re: SMS not going

    Hi Kunal,

    Is that a typo? You have a sendsms class nested inside another, identical class...

    Cheers,
    Mattt.

  3. #3
    kshaw661 is offline Member
    Join Date
    Jan 2011
    Location
    India
    Posts
    19

    Smile Re: SMS not going

    I done it.
    I have to write the curl for this then sms is going
    code is
    //$ch = curl_init('URL');

    /*curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_NOSIGNAL, 1);
    //curl_setopt($ch, CURLOPT_TIMEOUT_MS, 200); Not Needed
    $data = curl_exec($ch);
    $curl_errno = curl_errno($ch);
    $curl_error = curl_error($ch);
    curl_close($ch);
    Hope this is help some one.
    Thank You
    Kunal Shaw
    penguinCRM pvt. ltd.
    Hyderabad - India
    Kuanl Shaw
    Software Engineer
    penguinCRM pvt. ltd.
    Hyderabad, India

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •