This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once("./include/config.php"); | |
header("Content-type: text/xml"); | |
$db = new DB(); | |
$db->save_call(); | |
?> | |
<Response> | |
<Dial callbackUrl="http://dev.fullcourt.co/FullCourt-Call-Tracking/record_call.php" method="POST" callerId="815058383124"> | |
<Number><?php echo(AGENT_NUMBER);?></Number> | |
</Dial> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function save_call() { //https://www.fullcourt.co/ja/docs/PhoneXML/request | |
$CallTo = $_REQUEST['To']; | |
$CallFrom=$_REQUEST['From']; | |
$DialCallDuration=$_REQUEST['variable_billsec']; | |
$Direction=$_REQUEST['Direction']; | |
$CallerName=$_REQUEST['CallerName']; | |
$CallSid = $_REQUEST['CallUUID']; | |
$CallStatus=$_REQUEST['CallStatus']; | |
$DialCallSid=''; | |
$stmt = $this->db->prepare('INSERT INTO calls (DateCreated,CallSid,CallFrom,CallTo,CallStatus,Direction,CallerName,DialCallDuration,DialCallSid) VALUES (DATETIME('now','localtime'),?,?,?,?,?,?,?,?)'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('./include/config.php'); | |
header('Content-type: text/xml'); | |
$db = new DB(); | |
$db->saved_call(); | |
?> | |
<Response/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form class="well" method="post" action="sendsms.php"> | |
<div class="control-group"> | |
<label class="control-label" for="inputIcon">Sender Id</label> | |
<div class="controls"> | |
<div class="input-prepend"> | |
<span class="add-on"><i class="icon-envelope"></i></span><input class="span2" id="inputIcon" type="text" name="sender" placeholder="eg.FullCourt"> | |
</div> | |
</div> | |
<label class="control-label" for="inputIcon">Mobile Phone Number</label> | |
<div class="controls"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require "../Services/fullcourt.php"; | |
$from= $_REQUEST['sender']; | |
$to= $_REQUEST['number']; | |
$body = $_REQUEST['msg']; | |
$auth_id = "FCabcdefghijklmnopqrstuvwxyz123456"; | |
$auth_token = "1234567890qwertyuiosdfghjklxcvbnmd"; | |
$p = new RestAPI($auth_id, $auth_token); | |
// Send SMS | |
$params = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function user_generate_token($username, $phoneNum){ | |
global $accountsid, $authtoken, $fromNumber; | |
// Create a new password | |
$password = substr(md5(time().rand(0, 10^10)), 0, 5); | |
// Store the username and password. | |
$_SESSION['username'] = $username; | |
$_SESSION['password'] = $password; | |
/* Set our AccountSid and AuthToken */ | |
$accountsid= "FC20f8676ba75a63ba452784ca5858d217"; | |
$authtoken= "ocYw1LU8A9w64uztN5dKPzwrNH9ynmuXtx"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function user_login($username, $submitted) { | |
// Retrieve the stored password | |
$stored = $_SESSION['password']; | |
// Compare the retrieved vs the stored password | |
if ($stored == $submitted) { | |
$message = "Hello and welcome back $username"; | |
} else { | |
$message = "Sorry, that's an invalid username and password combination."; | |
} | |
// Clean up after ourselves |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'functions.php'; | |
/* | |
* First we retrieve each of the relevant variables and remove any | |
* non-alphanumeric characters filter them to protect against things such | |
* as SQL Injection. | |
*/ | |
$username = isset($_POST['username']) ? $_POST['username'] : ''; | |
$username = preg_replace("/[^A-Za-z0-9]/", "", $username); | |
$password = isset($_POST['password']) ? $_POST['password'] : ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
?> | |
<html> | |
<head> | |
<title>Two Factor Authentication Demo</title> | |
<style> | |
.center { | |
margin-left: auto; | |
margin-right: auto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Message": [ | |
{ | |
"VoiceURL": "http://test.com", | |
"APIVersion": "v0.1", | |
"DateCreated": "Mon, 11 Jun 2012 09:06:22 +0900", | |
"VoiceMethod": "", | |
"Sid": "PXdf37a0ebc71e93dcaee5547f5d5e65b9", | |
"FriendlyName": "TestTestTest", | |
"AccountSid": "FC2a73d65733d71b8249e39ab4d1254414", |
OlderNewer