Send SMS Message Using Clickatell API – Part 2
Posted on September 24th, 2007 in HTTP/S, PHP Tutorials | No Comments »
The second part of the tutorial is actually optional for those who know their way around php coding. These pages will help you diagnose errors with ease.
Create these three pages
1. failed.php
2. sent.php
3. badlogin.php
On sending the sms message three things are likely to happen;
1. Login Failure, i.e. failure to authenticate with the Clickatell Gateway
2. SMS Sending Failure , i.e. failure to send the sms
3. Successful message sending
And in any of the listed conditions above, you will be redirected to a corresponding php page to know where the fault it came from.
failed.php
<?php
//********************************************
//
// Send SMS Message Using Clickatell API – Part 3
// 23rd September 2007
// www.mboateng.com
// Michael Ofori Amanfo Boateng
//
//***********************************************
?><!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
</head>
<body>
<table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″>
<tr>
<td align=”center”><h1>Message Sending Failed</h1></td>
</tr>
</table>
</body>
</html>
Sent.php
<?php
//******************************************
//
// Send SMS Message Using Clickatell API – Part 3
// 23rd September 2007
// www.mboateng.com
// Michael Ofori Amanfo Boateng
//
//********************************************
?><!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
</head>
<body>
<table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″>
<tr>
<td align=”center”><h1>Message Sent</h1></td>
</tr>
</table>
</body>
</html>
badlogin.php
<?php
//*******************************************
//
// Send SMS Message Using Clickatell API – Part 3
// 23rd September 2007
// www.mboateng.com
// Michael Ofori Amanfo Boateng
//
//********************************************
?><!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
</head>
<body>
<table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”0″>
<tr>
<td align=”center”><h1>Login Failed</h1></td>
</tr>
</table>
</body>
</html>
Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7















