<?php 
    $username 
'USERNAME';
    
$password 'PASSWORD';
    
$destination 'PHONE NUMBER';
    
$source 'FROM NAME';
    
$text 'SAMPLE TEXT';
    
$schedule '2010-12-25 15:00:00'//25th December 2010, 3pm
        
    
$content =  'action=sendsms'.
                
'&user='.rawurlencode($username).
                
'&password='.rawurlencode($password).
                
'&to='.rawurlencode($destination).
                
'&from='.rawurlencode($source).
                
'&text='.rawurlencode($text).
                
'&scheduledatetime='.rawurlencode($schedule);
    
    
$smsglobal_response file_get_contents('http://www.smsglobal.com.au/http-api.php?'.$content);
    
    
//Sample Response
    //SMSGLOBAL DELAY MSGID:21021064 
    
    
$explode_response explode('SMSGLOBAL DELAY MSGID:'$smsglobal_response);
    
    if(
count($explode_response) == 2) { //Message Success
        
$smsglobal_schedule_id $explode_response[1];
        
        
//SMSGlobal Message ID
        
echo $smsglobal_schedule_id;
    } else { 
//Message Failed
        
echo 'Message Failed'.'<br />';
        
        
//SMSGlobal Response
        
echo $smsglobal_response;    
    }
?>