Tuesday, February 9, 2010

Script SMS PHP Curl Smsglobal com

Script SMS PHP Curl from http://smsglobal.com

Get try trial 25 fake sms and input user and password in this script php curl :

CODE



<?php
    
function sendSMS($content) {

        
$ch curl_init('http://www.smsglobal.com/http-api.php');
        
curl_setopt($chCURLOPT_POSTtrue);
        
curl_setopt($chCURLOPT_POSTFIELDS$content);
        
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
        
$output curl_exec ($ch);
        
curl_close ($ch);
        return 
$output;    
    }
    
    if(isset(
$_POST) && !empty($_POST)) {
        
//Set variables
        
$user        'username';
        
$password    'password';
        
$to          $_POST['to'];
        
$from        $_POST['from'];
        
$message     $_POST['message'];
        
        
//Encode content and send to SMS Global
        
$content =  'action=sendsms'.
                    
'&user='.rawurlencode($user).
                    
'&password='.rawurlencode($password).
                    
'&to='.rawurlencode($to).
                    
'&from='.rawurlencode($from).
                    
'&text='.rawurlencode($message);
        
        
//Send SMS through curl
        
$output sendSMS($content);                                              
    }
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Send SMS</title>
</head>
<body>
    <?php if(isset($output)) echo $output; else { ?>
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
        <h1>Send SMS</h1>
        <table>
            <tr>
                <td>Phone Numbers (Separate with comma)</td>
                <td><input type="text" name="to" /></td>
            </tr>
            <tr>
                <td>Sender ID</td>
                <td><input type="text" name="from" maxlength="11" /></td>
            </tr>
            <tr>
                <td>Message</td>
                <td><textarea name="message"></textarea></td>
            </tr>
            <tr>
                <td colspan="2"><input type="submit" name="submit" value="Submit" /></td>
            </tr>
        </table>
    </form><?php ?>
</body>
</html>




Select script sms copy and paste in notepad. save with extension .php Upload in your hosting and try send with your account.

1 comment:

Anonymous said...

not working. What to type in sender ID? mail me kool_guy580@yahoo.com