$filename = "/dev/ttyUSB4";
if (!$handle = fopen($filename, 'r+'))
{
echo "The device isn't detected";
exit;
}
else
{
if (fwrite($handle,"AT+CMGF=1\r"))
{
fwrite($handle,"AT+CMGS=\"+9465656\"".chr(26)."\r"."hiii");
fwrite($handle,chr(26)."\r"); //i think here we need some seconds to see modem respond OK , how to wait for it here ?
}
else
echo "Not called";
}
fclose($handle);
1-But each time it sends SMS , page requires one refresh before sending SMS again .
2-And it sends number in the SMS text instead of "hiii" .
Would you guide to solve these two problems?
Regards