Please reply me
Closed
lsha
Posts
2
Registration date
Wednesday October 7, 2009
Status
Member
Last seen
October 12, 2009
-
Oct 8, 2009 at 02:15 AM
lsha Posts 2 Registration date Wednesday October 7, 2009 Status Member Last seen October 12, 2009 - Oct 12, 2009 at 07:02 AM
lsha Posts 2 Registration date Wednesday October 7, 2009 Status Member Last seen October 12, 2009 - Oct 12, 2009 at 07:02 AM
Related:
- Please reply me
- Reply unicode.org - Guide
- Gmail reply all - Guide
- How to post snap reply on story - Guide
- How to reply with a video on tiktok - Guide
- Automatic reply outlook app - Guide
2 responses
Dear Isha,
It is indeed possible to send sms through php code.
Following is a sample that will help you understand how to do it.
<?php
//First prepare the info that relates to the connection
$host = "tm4b.com";
//although you can use an ip address, it is easier to just use tm4b.com
$request_length = strlen($request);
// when we post the header, we have to also include it's length
$script = "/client/api/send.php";
$method = "POST";
//Replace with "GET" if required.
if($method=="GET") $script .= "?$request";
//Appends the request if "GET" is being used.
//Now comes the header which we are going to post. This is where our messages details will be sent over.
$header = "$method
$script HTTP/1.1rn".
//"Host: $hostrn". "User-Agent: HTTP/1.1rn". "Content-Type: application/x-www-form-urlencodedrn". "Content-Length: $request_lengthrn". "Connection: closernrn". "$requestrn";
//Now we open up the connection
$socket = @fsockopen($host, 80, $errno, $errstr);
if ($socket) //if its open, then...
{ fputs($socket, $header);
// send the details over
while(!feof($socket)) $output[] = fgets($socket);
//get the results
fclose($socket);
}
//print_r($output);
//the message id's will be kept in one of the $output values
?>
Hope that this helps you in your task.
Thanks in advance.
It is indeed possible to send sms through php code.
Following is a sample that will help you understand how to do it.
<?php
//First prepare the info that relates to the connection
$host = "tm4b.com";
//although you can use an ip address, it is easier to just use tm4b.com
$request_length = strlen($request);
// when we post the header, we have to also include it's length
$script = "/client/api/send.php";
$method = "POST";
//Replace with "GET" if required.
if($method=="GET") $script .= "?$request";
//Appends the request if "GET" is being used.
//Now comes the header which we are going to post. This is where our messages details will be sent over.
$header = "$method
$script HTTP/1.1rn".
//"Host: $hostrn". "User-Agent: HTTP/1.1rn". "Content-Type: application/x-www-form-urlencodedrn". "Content-Length: $request_lengthrn". "Connection: closernrn". "$requestrn";
//Now we open up the connection
$socket = @fsockopen($host, 80, $errno, $errstr);
if ($socket) //if its open, then...
{ fputs($socket, $header);
// send the details over
while(!feof($socket)) $output[] = fgets($socket);
//get the results
fclose($socket);
}
//print_r($output);
//the message id's will be kept in one of the $output values
?>
Hope that this helps you in your task.
Thanks in advance.
lsha
Posts
2
Registration date
Wednesday October 7, 2009
Status
Member
Last seen
October 12, 2009
Oct 12, 2009 at 07:02 AM
Oct 12, 2009 at 07:02 AM
Thank you