Hi to all,

Thanks for your help. :-)
I've made it !

The trick was not to place a PUT Command but a GET. Here is the code which i've found in the lists.

$fp = fsockopen ($host, $port, $errno, $errstr, 30);
if (!$fp) {
echo "ERROR: $errstr ($errno)<br>\n";
} else {
fputs ($fp,"GET /cgi-bin/sendsms?$postdata HTTP/1.0\r\nHost: localhost\r\n\r\n");


      while (!feof($fp)) {
      $str .= fgets ($fp,128);
      }
     fclose ($fp);



Rudy wrote:

Hi Joao,

Use curl function in your PHP, it works for me (as I, too, found lynx inside PHP doesn't work). E.g.:

<?php
$url_1 = "http://localhost:13013/cgi-bin/sendsms?username=tester&; .......";
$url_2 = urlencode($url_1);
$url_3 = "/usr/bin/curl "."'$url_2'";
passthru($url_3);
?>


Regards,
Rudy



On Tuesday 20 January 2004 22:37, Jo�o Reis wrote:


Hi Abdul,

I was reading the mailing list and found that you had a similar problem
just like mine.

I'am integrating the sendsms cgi-bin in a PHP Code. I tried the curl
libraries and executing with lynx from the command line
and the answer is the same of yours (403 (Authorization failed from
server)).

How did you solved the problem?

Thansk in advance

Jo�o Reis












Reply via email to