Welcome Guest, Not a member yet? Register   Sign In
Clockwork SMS API integration in to Codeigniter
#1

[eluser]Unknown[/eluser]
Hi All,

I would like to ask for help to make Clockwork SMS API work in to codeigniter. Any help would be great.

Here is the Code:

Code:
<?php

require 'Clockwork.php'; //This is pre-buit class from http://www.clockworksms.com/. It works fine on normal domain but it doesnt work in codeigniter.


// Create a Clockwork object using your API key. I have got the Key
$clockwork = new Clockwork( $key );
  
// Setup and send a message
$message = array( "to" => "441234567890", "message" => "Hello World" );
$result = $clockwork->send( $message );
  
// Check if the send was successful
if( $result["success"] ) {
    echo "Message sent - ID: " . $result["id"];
} else {
    echo "Message failed - Error: " . $result["error_message"];
}

?>
#2

[eluser]Unknown[/eluser]
Hi,

Are you getting an error when trying to require the file? If you dump the value of $result, what do you get?

Best wishes,

James
Mediaburst




Theme © iAndrew 2016 - Forum software by © MyBB