2 way doesn't send output to HTTP url | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through April 16, 2015 ⬆ |
◄ ► |
Author | Message | |||
kashif mushtaq New member Username: Kashifmushtaq2008 Post Number: 1 Registered: 09-2014 |
Hi, i have download the trial version of your software NOWSMS. i have configured with the sony Ericson USB GSM Modem. your software is soo good but i wsa getting the erro "command not completed. Request return invalid content type: text/html" i have studied all the forum on your website. and i have tired more than 45 days but i lose my hope in ur software. if you can help me i really want to buy ur software. plz help me. or send me the exact code so that i can use and buy it. plz see the code. i have gone through ur message board but helpless; ------------------------------ <?php header('Content-Type: text/plain; charset=utf-8'); ?> <?php require_once('Connections/conn.php'); ?> <?php mysql_select_db($database_conn, $conn); $query_Recordset1 = "SELECT * FROM sheet1 where ALTCODE = '".$_REQUEST['sms']."'"; $Recordset1 = mysql_query($query_Recordset1, $conn) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); function SendSMS ($host, $port, $username, $password, $phoneNoRecip, $msgText) { $fp = fsockopen($host, $port, $errno, $errstr); if (!$fp) { echo "errno: $errno \n"; echo "errstr: $errstr\n"; return $result; } fwrite($fp, "GET /?Phone=" . rawurlencode($phoneNoRecip) . "&Text=" . rawurlencode($msgText) . " HTTP/1.0\n"); if ($username != "") { $auth = $username . ":" . $password; $auth = base64_encode($auth); fwrite($fp, "Authorization: Basic " . $auth . "\n"); } fwrite($fp, "\n"); $res = ""; while(!feof($fp)) { $res .= fread($fp,1); } fclose($fp); return $res; } if (isset($_REQUEST['sender'])) { if (isset($_REQUEST['text'])) { $data = "ID:". $row_Recordset1['ALTCODE']."\r\n" . "Name:" . $row_Recordset1['NAME']. "\r\n" . "fname:".$row_Recordset1['FNAME'] . "\r\n" . "Phone:".$row_Recordset1['PHONE'] . "\r\n" . "address:" . $row_Recordset1['ADDRESS1'] . $row_Recordset1['ADDRESS2']; $x = SendSMS("127.0.0.1", 8800, "admin", "admin", $_REQUEST['sender'], $data); echo $x; } else { echo "ERROR : Message not sent -- Text parameter is missing!\r\n"; } } else { echo "ERROR : Message not sent -- Phone parameter is missing!\r\n"; } ?> ---------------------------------- | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 5041 Registered: 08-2008 |
Hi, My suggestion would be to enable the SMSDEBUG.LOG (checkbox option on Serial # page). Send in another message. In that log file you will see the HTTP request and response. Perhaps a PHP error is occurring, and you will get a better idea of what request is being made from the log. I would also suggest only one opening <?php tag, as that may be causing some confusion. -- Des NowSMS Support |