2009-10-30, 18:06
I am trying to build a module in AMX Netlinx (Home Automation) to control the XBMC. I am pretty new to the xbmc world. The module is currently sending a POST command as follows:
SEND_STRING dvIP, "'POST /cgitb.py HTTP/1.1',13,10,
'Accept-Language: en-us',13,10,
'Content-Type: application/x-www-form-urlencoded',13,10 ,
'Accept-Encoding: gzip, deflate',13,10,
'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.1; SV1; .NET CLR 1.1.4322;
.NET CLR 2.0.50727)',13,10,
'Host: ',IP_ADDRESS,13,10,
'Connection: Keep-Alive',13,10,
'Cache-Control: no-cache',13,10,
'Content-Length: ',ITOA(LENGTH_STRING(<COMMAND>)),
13,10,
'Content-Type: text/html',13,10,
'Authorization: Basic Og==',13,10,13,10,
<COMMAND>,13,10"
************************************************** *******
Although I can connect up okay to the port each command is returning:
HTTP/1.1 404 Site or Page Not Found
Server: GoAhead-Webs
Date: Thu Oct 29 11:32:26 2009
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html
<html><head><title>Document Error: Site or Page Not Found</title></head>
<body><h2>Access Error: Site or Page Not Found</h2>
<p>Cannot open URL</p></body></html>
************************************************** **
Please give your suggestions and let me know of a parameter that may be off.
Thanks, in advance.
SEND_STRING dvIP, "'POST /cgitb.py HTTP/1.1',13,10,
'Accept-Language: en-us',13,10,
'Content-Type: application/x-www-form-urlencoded',13,10 ,
'Accept-Encoding: gzip, deflate',13,10,
'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.1; SV1; .NET CLR 1.1.4322;
.NET CLR 2.0.50727)',13,10,
'Host: ',IP_ADDRESS,13,10,
'Connection: Keep-Alive',13,10,
'Cache-Control: no-cache',13,10,
'Content-Length: ',ITOA(LENGTH_STRING(<COMMAND>)),
13,10,
'Content-Type: text/html',13,10,
'Authorization: Basic Og==',13,10,13,10,
<COMMAND>,13,10"
************************************************** *******
Although I can connect up okay to the port each command is returning:
HTTP/1.1 404 Site or Page Not Found
Server: GoAhead-Webs
Date: Thu Oct 29 11:32:26 2009
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html
<html><head><title>Document Error: Site or Page Not Found</title></head>
<body><h2>Access Error: Site or Page Not Found</h2>
<p>Cannot open URL</p></body></html>
************************************************** **
Please give your suggestions and let me know of a parameter that may be off.
Thanks, in advance.