Send SMS Message Using Clickatell API - Part 2

Written on September 24, 2007 – 3:06 pm | by Michael Boateng |

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>

Download Tutorial >>

Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

Post a Comment

About This Blog

Welcome to the Official Blog of Michael Ofori Amanfo Boateng [www.mboateng.com], an online blog resource for all web designers Ghana. There will be tutorials on Ajax ,ASP, ASP.NET, C#, CFML, Flash, JavaScript, PHP, Python (125) and Ruby on Rails. More

Want to subscribe?

 Subscribe in a reader Or, subscribe via email:
Enter your email address:  
Find entries :