[Solved] PHP returning a request POST. HELP!
Posted: Thu Aug 12, 2004 5:39 pm
Taking into consideration that i am using PHP 4.1.2 (Debian Stable version) to build the SyncML server.
==========================================
==Below is the Header information
==from $_SERVER received by server
==========================================
CONTENT_LENGTH == 1340
CONTENT_TYPE == application/vnd.syncml+wbxml
DOCUMENT_ROOT == /var/www
HTTP_ACCEPT == application/vnd.syncml+wbxml, text/x-vcard, text/x-vcalendar, image/vnd.wap.wbmp, image/gif
HTTP_ACCEPT_APPLICATION == 1,2
HTTP_ACCEPT_CHARSET == US-ASCII, ISO-8859-1, UTF-8, ISO-10646-UCS-2
HTTP_ACCEPT_LANGUAGE == en
HTTP_BEARER_INDICATION == 0
HTTP_CLIENT_IP == 10.184.24.197
HTTP_HNAME1 == hvalue1
HTTP_HNAME2 ==
HTTP_HNAME3 == hvalue3
HTTP_HOST == pc6.homelinux.com
HTTP_USER_AGENT == SonyEricssonT616/R101 Profile/MIDP-1.0 Configuration/CLDC-1.0
HTTP_VIA == WTP/1.1 proatlwap02 (Nokia WAP Gateway 4.0/ECD10/4.0.64), HTTP/1.1 proatledmpxy02[0540000D] (Traffic-Server/5.1.3-55590 [uScM])
HTTP_X_NETWORK_INFO == GPRS,unsecured
HTTP_X_NOKIA_BEARER == GPRS
HTTP_X_NOKIA_CONNECTION_MODE == CMODE
HTTP_X_NOKIA_GATEWAY_ID == NWG/4.0/Build64
HTTP_X_WAP_PROFILE == http://wap.sonyericsson.com/UAprof/T616R101.xml
PATH == /bin:/usr/bin:/sbin:/usr/sbin
REMOTE_ADDR == 66.94.27.3
REMOTE_PORT == 35374
========================================
What i did to reply to this request from my server after processing the SyncML packages. I wrote
Is this how i am suppose to send it back to the client?
Is there a way to dump the header that i sent out so i can check it?
Please HELP!!!
Thank you in advance
Regards
Mian
==========================================
==Below is the Header information
==from $_SERVER received by server
==========================================
CONTENT_LENGTH == 1340
CONTENT_TYPE == application/vnd.syncml+wbxml
DOCUMENT_ROOT == /var/www
HTTP_ACCEPT == application/vnd.syncml+wbxml, text/x-vcard, text/x-vcalendar, image/vnd.wap.wbmp, image/gif
HTTP_ACCEPT_APPLICATION == 1,2
HTTP_ACCEPT_CHARSET == US-ASCII, ISO-8859-1, UTF-8, ISO-10646-UCS-2
HTTP_ACCEPT_LANGUAGE == en
HTTP_BEARER_INDICATION == 0
HTTP_CLIENT_IP == 10.184.24.197
HTTP_HNAME1 == hvalue1
HTTP_HNAME2 ==
HTTP_HNAME3 == hvalue3
HTTP_HOST == pc6.homelinux.com
HTTP_USER_AGENT == SonyEricssonT616/R101 Profile/MIDP-1.0 Configuration/CLDC-1.0
HTTP_VIA == WTP/1.1 proatlwap02 (Nokia WAP Gateway 4.0/ECD10/4.0.64), HTTP/1.1 proatledmpxy02[0540000D] (Traffic-Server/5.1.3-55590 [uScM])
HTTP_X_NETWORK_INFO == GPRS,unsecured
HTTP_X_NOKIA_BEARER == GPRS
HTTP_X_NOKIA_CONNECTION_MODE == CMODE
HTTP_X_NOKIA_GATEWAY_ID == NWG/4.0/Build64
HTTP_X_WAP_PROFILE == http://wap.sonyericsson.com/UAprof/T616R101.xml
PATH == /bin:/usr/bin:/sbin:/usr/sbin
REMOTE_ADDR == 66.94.27.3
REMOTE_PORT == 35374
========================================
What i did to reply to this request from my server after processing the SyncML packages. I wrote
Code: Select all
<?php
header("POST HTTP/1.1 200 OK");
header("Content-Type: application/vnd.syncml+wbxml");
header("Accept-Charset: UTF-8");
header("transfer-coding: chunked");
echo $wbxml_obj //this is the response encoded in WBXML
?>Is there a way to dump the header that i sent out so i can check it?
Please HELP!!!
Thank you in advance
Regards
Mian