SMScord API


    public function send()
    {
        //do not change this url
        $url = "https://smscord.com/Api/sendsms";

        // these are where you specify data, just key, secret, phone and message
        $data = array(

            // log into your account to get these.
            "user_key" => 'opskill',
            "user_secret" => 'opskill',

            // start with country code,
            // else the system will use the country from where sender comes
            "phone" => '254725750651',
            "message" => 'Opskill sms delivery test',
        );
        $ch = curl_init($url);
        # Setup request to send json via POST.
        $payload = json_encode($data);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
        # Return response instead of printing.
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 30);
        # Send request.
        $result = curl_exec($ch);
        curl_close($ch);
        # Print response.
         echo $result ;
                }
                

     public function addcontact()
    {
        //do not chnge this url
        $url = "https://sms.opskill.com/Api/addcontact";

        // these are where you specifi data
        $data = array(

            // log into your account to get these.
            "user_key" => 'opskill',
            "user_secret" => 'opskill',

            // start with country code,
            // else the system will use the country from where sender comes
            "group_id" => 23,
            "contact_name" => 'Justus Ochieng',
            "contact_phone" => 254725750651,
        );
        $ch = curl_init($url);
        # Setup request to send json via POST.
        $payload = json_encode($data);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
        # Return response instead of printing.
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 30);
        # Send request.
        $result = curl_exec($ch);
        curl_close($ch);
        # Print response.
        echo $result;

    }
                

Opskill Company @2019, All rights reserved.