youngj / EnvayaSMS

Simple SMS and MMS gateway running on Android
http://sms.envaya.org
Other
159 stars 177 forks source link

Invalid response type text/xml or html #28

Open rref opened 12 years ago

rref commented 12 years ago

I have these error on application log when it checking messages. I also use only these code as server URL/sms.php only outgoing sms

require_once "config.php"; require_once "EnvayaSMS.php"; //$request = EnvayaSMS::get_request();

header("Content-Type: text/xml");

$porr = new EnvayaSMS_OutgoingMessage(); $porr->id = $idall; $porr->to = $_POST['mobile']; $porr->message = $_POST['message']; $porr->type= 'sms';

youngj commented 12 years ago

See http://sms.envaya.org/serverapi/upgrade30.html

On Thu, Jun 7, 2012 at 7:21 AM, rref reply@reply.github.com wrote:

I have these error on application log when it checking messages. I also use only these code as server URL/sms.php

 require_once "config.php"; require_once "EnvayaSMS.php"; //$request = EnvayaSMS::get_request();

header("Content-Type: text/xml");

$porr = new EnvayaSMS_OutgoingMessage(); $porr->id = $idall; $porr->to = $_POST['mobile']; $porr->message = $_POST['message']; $porr->type= 'sms';


Reply to this email directly or view it on GitHub: https://github.com/youngj/EnvayaSMS/issues/28

rref commented 12 years ago

im using EnvayaSMS 3.0.1 , so this line header("Content-Type: text/xml"); is header("Content-Type: {$request->get_response_type()}"); and its the same thing.. maybe it get wrong becouse i made function eg. send_sms() { require_once "config.php"; require_once "EnvayaSMS.php"; $request = EnvayaSMS::get_request();

header("Content-Type: {$request->get_response_type()}");

$porr = new EnvayaSMS_OutgoingMessage(); $porr->id = $idall; $porr->to = $_POST['mobile']; $porr->message = $_POST['message']; $porr->type= 'sms'; }

but when i put require_once "config.php"; require_once "EnvayaSMS.php"; out from function send_sms() i get error on web page, but no error on app log. :S