Restrict phone numbers

Restrict phone numbers SearchSearch

SMS & MMS Technical Forum » NowSMS Support - SMS Issues (Product Support Only) » Archive through May 07, 2008 » Restrict phone numbers « Previous || Next »
Author Message
Andre
New member
Username: Legionfx

Post Number: 3
Registered: 11-2007
Posted on Thursday, November 22, 2007 - 12:23 am:   

okay im using this script and its working fine


function SendSMS ($host, $port, $username, $password, $PhoneNumber, $Text) {

$fp = fsockopen($host, $port, $errno, $errstr);
if (!$fp) {
echo "errno: $errno \n";
echo "errstr: $errstr\n";
return $result;
}

fwrite($fp, "GET /?Phone=" . rawurlencode($PhoneNumber) . "&Text=" . rawurlencode($Text) . " HTTP/1.0\n");
if ($username != "") {
$auth = $username . ":" . $password;

$auth = base64_encode($auth);

fwrite($fp, "Authorization: Basic " . $auth . "\n");
}
fwrite($fp, "\n");

$res = "";

while(!feof($fp)) {
$res .= fread($fp,1);
}
fclose($fp);


return $res;
}



$x = SendSMS("server.bla.bla", 8800, $username, $password, $PhoneNumber, $Text);
echo $x;


?>


my question is how can i make the users send sms only to one network in this case it the prefix "96" . and is it possible to redirect users to another page instead of that Message Submitted page?

Thanks

Login Login / Register Logout Logout Search Last 30 Days Topics Topics