I have an sms server installed on my computer and a gsm modem attached to the usb port, so if I hit http://localhost:9333/ozeki? on the browser a login page appears and after I log in there is a form using which I can send sms to mobile phones. This works fine.
Now to send sms from my web application(which will be running on localhost)
I have created a form and it looks like following
<form name="form" action="send.php" method="post">
<table width="600" align="center" border="1">
<tr>
<td>Sender </td> <td> <input type="text" name="sender" /> </td>
</tr>
<tr>
<td>Recepient </td> <td> <input type="text" name="recepient" /> </td>
</tr>
<tr>
<td>Message </td> <td> <input type="text" name="message" /> </td>
</tr>
<tr>
<td colspan="2"> <input type="submit" name="submit" value="Send" /> </td>
</tr>
</table>
</form>
My send.php
$recepient=$_POST['recepient'];
$message=$_POST['message'];
$sender=$_POST['sender'];
$url='http://localhost:9333/ozeki?';
$url.="action=sendMessage";
$url.="&login=admin";
$url.="&password=abc123";
$url.="&recepient=".urlencode($recepient);
$url.="&messageData=".urlencode($message);
$url.="&sender=".urlencode($sender);
file($url);
Now the problem is when I click on the submit button the page goes to send.php and usually it takes a lot of time to respond and when it finally does this error message appear:
Warning: file(http://localhost:9333/ozeki?action=sendMessage&login=admin&password=abc123&recepient={my_number}&messageData=comp&sender={my_number}) [function.file]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\xampp\htdocs\sms\send.php on line 14
Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\sms\send.php on line 16
$urlinto the browser (without logging in first).http://localhost:9333/ozeki?action=sendMessage&login=admin&password=abc123&recepient=01672095631&messageData=comp&sender=01719349818- Does it send your message?