With next code I want to send bynary data to php script:
lcData = filetostr("MyFile.dat")
loHTTP = CREATEOBJECT('WinHttp.WinHttpRequest.5.1')
loHTTP.Open("POST", "
http://www.MySite.com/MyScript.php", .f.)
loHttp.setrequestheader("content-type","application/x-www-form-urlencoded")
IF NOT loHTTP.Send( lcData )
MESSAGEBOX( loHTTP.ErrorCode+loHTTP.ErrorMsg)
ENDIF
In this script $HTTP_RAW_POST_DATA gets only first 5 symbols
Maybe problem is connected with next info
from loHTTP.GetAllResponseHeaders() :
----------------------------
Date: Mon, 23 Jul 2007 09:24:58 GMT
Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2
mod_bwlimited/1.4 PHP/4.4.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28
OpenSSL/0.9.7e-p1
X-Powered-By: PHP/4.4.4
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=cp1251
------------------------------
Why "Content-Type" is text/html ?
Thanks in advance for any help