/*
A send example. It requires that you set the keyword that is being sent from, 
and also that your keyphrase has been set.  When you receive a message, you will be
supplied with the carrier code.

Requires CURL.

Carrier Code: ALLTELUS  		Carrier Name: Alltel
Carrier Code: ATTUS  			Carrier Name: AT&T Wireless
Carrier Code: BOOSTUS  			Carrier Name: Boost USA
Carrier Code: CELLULARSOUTHUS  	Carrier Name: Cellular South
Carrier Code: CINGULARUS  		Carrier Name: Cingular Wireless
Carrier Code: DOBSONUS  		Carrier Name: Dobson
Carrier Code: NEXTELUS  		Carrier Name: Nextel Communications
Carrier Code: SPRINTUS  		Carrier Name: Sprint PCS
Carrier Code: TMOBILEUS 		Carrier Name: T-Mobile USA
Carrier Code: VERIZONUS  		Carrier Name: Verizon Wireless
Carrier Code: VIRGINUS  		Carrier Name: Virgin USA
*/
$gumbandEndpoint = "http://www.gumband.com/send/send.php";


$outgoing_keyword 	= "YOUR_KEYWORD";		//for outgoing quota authorization, you must tell us the keyword you are using
$message_to_send 	= "YOUR_MESSAGE"; 		//your message
$mobile_to_send_to 	= "YOUR_MOBILE_NUMBER";	//the destination phone number
$carrier 			= "YOUR_CARRIER";		//the destination carrier. see table above, also receive code example
$keyphrase			= "YOUR KEYPHRASE";
$checksum 			= md5($outgoing_keyword . $message_to_send . $keyphrase);


function runCurl($url, $params = null){
	$session = curl_init();
	curl_setopt($session, CURLOPT_HEADER, false);
	curl_setopt($session, CURLOPT_POST, true);
	curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($session, CURLOPT_URL, $url);
	if($params != null) {
		curl_setopt($session, CURLOPT_POSTFIELDS, $params);
	}
	$response = curl_exec($session);
	curl_close($session);		
	return $response;
}

$curlResp = runCurl($gumbandEndpoint, array(
	'keyword' => $outgoing_keyword,
	'message' => $message_to_send,
	'carrier' => $carrier,
	'handset' => $mobile_to_send_to,
	'checksum' => $checksum
));

echo $curlResp;