Possuo um formulário de agendamento de visitas, quando o usuário faz seu agendamento e confirma é disparado um e-mail para o mesmo com informações do agendamento. Gostaria de saber se alguém já integrou uma API de SMS com PHP.
Exemplo:
Minha API de envio utiliza a seguinte URL para mandar o SMS
Como que faço para incluir essa API logo que dispara o e-mail já de confirmação para o usuario sobre o agendamento.
Parte do código do form de entrada dos dados
<div id="wizard-frame-3" class="wizard-frame" style="display:none;">
<div class="frame-container">
<h3 class="frame-title"><?php echo $this->lang->line('step_three_title'); ?></h3>
<div class="frame-content row">
<div class="col-xs-12 col-sm-6">
<div class="form-group">
<label for="first-name" class="control-label"><?php echo $this->lang->line('first_name'); ?> *</label>
<input type="text" id="first-name" class="required form-control" maxlength="100" />
</div>
<div class="form-group">
<label for="last-name" class="control-label"><?php echo $this->lang->line('last_name'); ?> *</label>
<input type="text" id="last-name" class="required form-control" maxlength="250" />
</div>
<div class="form-group">
<label for="email" class="control-label"><?php echo $this->lang->line('email'); ?> *</label>
<input type="text" id="email" class="required form-control" maxlength="250" />
</div>
<div class="form-group">
<label for="phone-number" class="control-label"><?php echo $this->lang->line('phone_number'); ?> *</label>
<input type="text" id="phone-number" class="required form-control" maxlength="60" />
</div>
</div>
<div class="col-xs-12 col-sm-6">
<div class="form-group">
<label for="address" class="control-label"><?php echo $this->lang->line('address'); ?></label>
<input type="text" id="address" class="form-control" maxlength="250" />
</div>
<div class="form-group">
<label for="city" class="control-label"><?php echo $this->lang->line('city'); ?></label>
<input type="text" id="city" class="form-control" maxlength="120" />
</div>
<div class="form-group">
<label for="zip-code" class="control-label"><?php echo $this->lang->line('zip_code'); ?></label>
<input type="text" id="zip-code" class="form-control" maxlength="120" />
</div>
<div class="form-group">
<label for="notes" class="control-label"><?php echo $this->lang->line('notes'); ?></label>
<textarea id="notes" maxlength="500" class="form-control" rows="3"></textarea>
</div>
</div>
<em id="form-message" class="text-danger"><?php echo $this->lang->line('fields_are_required'); ?></em>
</div>
</div>
<div class="command-buttons">
<button type="button" id="button-back-3" class="btn button-back btn-default"
data-step_index="3"><span class="glyphicon glyphicon-backward"></span>
<?php echo $this->lang->line('back'); ?>
</button>
<button type="button" id="button-next-3" class="btn button-next btn-primary"
data-step_index="3">
<?php echo $this->lang->line('next'); ?>
<span class="glyphicon glyphicon-forward"></span>
</button>
</div>
</div>
<?php
// ------------------------------------------------------
// APPOINTMENT DATA CONFIRMATION
// ------------------------------------------------------ ?>
<div id="wizard-frame-4" class="wizard-frame" style="display:none;">
<div class="frame-container">
<h3 class="frame-title"><?php echo $this->lang->line('step_four_title'); ?></h3>
<div class="frame-content row">
<div id="appointment-details" class="col-xs-12 col-sm-6"></div>
<div id="customer-details" class="col-xs-12 col-sm-6"></div>
</div>
<?php if ($this->settings_model->get_setting('require_captcha') === '1'): ?>
<div class="frame-content row">
<div class="col-sm-12 col-md-6">
<h4 class="captcha-title">
CAPTCHA
<small class="glyphicon glyphicon-refresh"></small>
</h4>
<img class="captcha-image" src="<?php echo site_url('captcha'); ?>">
<input class="captcha-text" type="text" value="" />
<span id="captcha-hint" class="help-block" style="opacity:0"> </span>
</div>
</div>
<?php endif; ?>
</div>
<div class="command-buttons">
<button type="button" id="button-back-4" class="btn button-back btn-default"
data-step_index="4">
<span class="glyphicon glyphicon-backward"></span>
<?php echo $this->lang->line('back'); ?>
</button>
<form id="book-appointment-form" style="display:inline-block" method="post">
<button id="book-appointment-submit" type="button" class="btn btn-success">
<span class="glyphicon glyphicon-ok"></span>
<?php
echo (!$manage_mode) ? $this->lang->line('confirm')
: $this->lang->line('update');
?>
</button>
<input type="hidden" name="csrfToken" />
<input type="hidden" name="post_data" />
</form>
</div>
</div>
Arquivo de envio do email
<title>Appointment Details</title>
<div id="content" style="padding: 10px 15px;">
<h2>$email_title</h2>
<p>$email_message</p>
<h2>Appointment Details</h2>
<table id="appointment-details">
<tr>
<td class="label" style="padding: 3px;font-weight: bold;">Service</td>
<td style="padding: 3px;">$appointment_service</td>
</tr>
<tr>
<td class="label" style="padding: 3px;font-weight: bold;">Provider</td>
<td style="padding: 3px;">$appointment_provider</td>
</tr>
<tr>
<td class="label" style="padding: 3px;font-weight: bold;">Start</td>
<td style="padding: 3px;">$appointment_start_date</td>
</tr>
<tr>
<td class="label" style="padding: 3px;font-weight: bold;">End</td>
<td style="padding: 3px;">$appointment_end_date</td>
</tr>
</table>
<h2>Customer Details</h2>
<table id="customer-details">
<tr>
<td class="label" style="padding: 3px;font-weight: bold;">Name</td>
<td style="padding: 3px;">$customer_name</td>
</tr>
<tr>
<td class="label" style="padding: 3px;font-weight: bold;">Email</td>
<td style="padding: 3px;">$customer_email</td>
</tr>
<tr>
<td class="label" style="padding: 3px;font-weight: bold;">Phone</td>
<td style="padding: 3px;">$customer_phone</td>
</tr>
<tr>
<td class="label" style="padding: 3px;font-weight: bold;">Address</td>
<td style="padding: 3px;">$customer_address</td>
</tr>
</table>
<h2>Appointment Link</h2>
<a href="$appointment_link" style="width: 600px;">$appointment_link</a>
</div>
</div>