cpg12 wrote:
Philippines International number format is 12 character.
<input type="text" name="number"size="20" maxlength="11" format="*N"/><br/>
make it as maxlength="12"
Thank You i have changed the maxlength from "12" to "15"
Also Regarding my previous Post above unfortunately, for those of you who would like to use the API on your site instead of the Iframe Snippet Previously Posted. The only Option is to use our Premium API which will require you to purchase credits for the API to work on your site. The Premium API is Ad FREE an can be customised to fit an implement into your website, you can also include your own Footer Ads into every sms sent from your website.
I will Give an limited offer to All coding-talk.com Members who purchase Credits for the premium API i will Give you an Additional 500 Credits this offer will only be for the month of April starting today APRIL-04-2011 an will End on APRIL-30-2011 All you have to do is inbox me Your Transaction ID an usercode.
Here is the Premium API Script
<?php
echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD XHTML Mobile 1.0//EN\"". " \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Free SMS</title>
<meta forua="true" http-equiv="Cache-Control" content="no-cache"/>
<meta forua="true" http-equiv="Cache-Control" content="must-revalidate"/>
</head>
<body>
<?php
if ($_POST['Submit'] == 'Submit')
{
$message=$_POST["message"];
$mobile=$_POST["number"];
$userid="YOUR ID HERE"; //// Your ID From gysms.com
$usercode="YOUR USER CODE HERE"; //// Your usercode From gysms.com
if ($mobile=="" OR $message==""){
echo"Sorry An error was encountered while sending your SMS<br/>";
}
else{
$sender="GYSMS.com";
$count=strlen($sender);
$count=120-$count;
if(strlen($message)>$count){
$message=substr($message, 0, $count);
$flag[0]=1;
$flag[1]=strlen($message);
}
$message.=$sender;
if($flag[0]==1){
echo "Your message was longer than $flag[1] characters so it was truncated and first $flag[1] characters have been sent.<br/>";
}
//IMPORTANT: DO NOT EDIT ANYTHING BEYOND THIS POINT
//create array of data to be posted to GYSMS API
$post_data['PhoneNumber'] = "$mobile";
$post_data['Text'] = "$message";
$post_data['cusid'] = "$userid";
$post_data['usercode'] = "$usercode";
//traverse array and prepare data for posting to gysms.com
foreach ( $post_data as $key => $value) {
$post_items[] = $key . '=' . $value;
}
//create the final string to be posted using implode()
$post_string = implode ('&', $post_items);
//we are going to need the length of the data string
$data_length = strlen($post_string);
//let's open the connection
$connection = fsockopen('gysms.com', 80);
//sending the data
fputs($connection, "POST /api.php HTTP/1.1\r\n");
fputs($connection, "Host: gysms.com \r\n");
fputs($connection, "Content-Type: application/x-www-form-urlencoded\r\n");
fputs($connection, "Content-Length: $data_length\r\n");
fputs($connection, "Connection: close\r\n\r\n");
fputs($connection, $post_string);
//closing the connection
fclose($connection);
echo "Your SMS has been successfully sent to $mobile<br/>";
}
}
$msglength= "120";
if($action=="")
{
echo "<form action=\"\" method=\"post\">
Enter mobile No<br/>
<input type=\"text\" name=\"number\"size=\"20\" maxlength=\"11\" format=\"*N\"/><br/>
Enter your message($msglength chars max):<br/>
<textarea type=\"Text\" name=\"message\" maxlength=\"$msglength\"></textarea><br/>
<input type=\"submit\" name=\"Submit\" value=\"Submit\"/>
</form>";
echo "</body>";
}
echo "</body></html>";
?>
If you do not want to use the Premium API then you can use the Iframe Snippet no credits are needed to use that.
Added after 22 minutes:
ozziemale31 wrote:
does it work for australia?
Yes Australia is supported by our Network, if you want to test our coverage use this tool.
Coverage test
FREE International SMS
GYSMS.com Provides FREE International sms Reach over 775 networks in more than 221 countries at no cost to you. and the Good News is we own our SMS Hardware so there is no third party SMS API involved our services are completely Ad supported.....
http://gysms.com
Send FREE International MMS and Share Files worldwide using our MMS Service.
http://gysms.net
GTriddim Live Online Radio Station
http://www.gtriddim.com