CodeIgniter Forums
Clockwork SMS API integration in to Codeigniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Clockwork SMS API integration in to Codeigniter (/thread-54830.html)



Clockwork SMS API integration in to Codeigniter - El Forum - 09-27-2012

[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"];
}

?>



Clockwork SMS API integration in to Codeigniter - El Forum - 10-15-2012

[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