title: Getting an Error Message when Sending SMS using using PHP
body: <p>I have an sms server installed on my computer and a gsm modem attached to the usb port, so if I hit <code>http://localhost:9333/ozeki?</code> 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.</p>
  
  <p>Now to send sms from my web application(which will be running on localhost)</p>
  
  <p>I have created a form and it looks like following</p>
  
  <pre><code>&lt;form name="form" action="send.php" method="post"&gt;
  
  &lt;table width="600" align="center" border="1"&gt;
  &lt;tr&gt;
  &lt;td&gt;Sender &lt;/td&gt; &lt;td&gt; &lt;input type="text" name="sender" /&gt; &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Recepient &lt;/td&gt; &lt;td&gt; &lt;input type="text" name="recepient" /&gt; &lt;/td&gt;
  &lt;/tr&gt;
   &lt;tr&gt;
  &lt;td&gt;Message &lt;/td&gt; &lt;td&gt; &lt;input type="text" name="message" /&gt; &lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr&gt;
  &lt;td colspan="2"&gt; &lt;input type="submit" name="submit" value="Send" /&gt; &lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>My send.php</p>
  
  <pre><code>   $recepient=$_POST['recepient'];
     $message=$_POST['message'];
     $sender=$_POST['sender'];
  
     $url='http://localhost:9333/ozeki?';
    $url.="action=sendMessage";
    $url.="&amp;login=admin";
    $url.="&amp;password=abc123";
    $url.="&amp;recepient=".urlencode($recepient);
    $url.="&amp;messageData=".urlencode($message);
    $url.="&amp;sender=".urlencode($sender);
    file($url);
  </code></pre>
  
  <p>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:</p>
  
  <p>Warning: file(<a href="http://localhost:9333/ozeki?action=sendMessage&amp;login=admin&amp;password=abc123&amp;recepient=" rel="nofollow noreferrer">http://localhost:9333/ozeki?action=sendMessage&amp;login=admin&amp;password=abc123&amp;recepient=</a>{my_number}&amp;messageData=comp&amp;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</p>
  
  <p>Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\sms\send.php on line 16  </p>