|
Posted by Dag Sunde on 11/14/06 17:19
Dag Sunde wrote:
> Steve Gerrard wrote:
>> "Dag Sunde" <me@dagsunde.com> wrote in message
>> news:4559e5e9$0$16511$8404b019@news.wineasy.se...
>>>
>>> From vb, use the XmlHttp object or one of its siblings to POST
>>> the data to this php-script on the server.
>>>
>>> To view the high-scores, use the same principle. (Do it from php,
>>> and when your vb client needs it, Use HTTP).
>>>
>>
>> Dag, how much data is reasonable to move back and forth using the
>> XmlHttp object in VB6? Is it pretty much limited to a few parameters
>> like name, rank, and serial number, or can you move a list of stuff?
>> It sounds just right for OP's needs, but I'm curious about other
>> situations. I suppose I could try moving more data with a series of
>> calls or something?
>
> If you use the "GET", it is limited to the max-length of the URL...
>
> In Internet Explorer, this is 2,083 bytes, so I guess it is something
> similar in the XMLHttp-object too.
>
> If you use "POST" on the other hand, it is up to the server.
> In IIS, the maximum number of bytes for one form variable is
> approx. 102,399 bytes. To overcome this, you just send
> several fields (variables) with the same name. IIS (ASP)
> will then see them as an array you can loop thru.
>
> I frequently send (POST) 500K via the xmlhttp object to an
> ASP script running on IIS 5.0...
>
> So if my POST'ed data look like this:
> //PseudoJavascript
> sData = "xmlData=" + escape("102399BytesOfData")
> sData = sData + "&xmlData=" + escape("another102399BytesOfData")
>
> xmlReq.open("POST", "Receiver.asp", true);
> xmlReq.onreadystatechange = xmlSendBidCallback;
> xmlReq.setRequestHeader( "Content-Type",
> "application/x-www-form-urlencoded");
> xmlReq.send( sData );
>
> My Receiver.asp will assemble it like this:
>
> //VBS fragment..
> Dim xmlData
> Dim i
> for i = 1 to Request.Form("XmlData").Count
> xmlData = xmlData & Request.Form("XmlData")(i)
> next
Forgot!
The response from these calls has no limit in its response...
(Except for timeout issues...)
So if you send a short request like "getHiscores.asp?limit=all",
and that results in a .responseText being 900K lonk, that
is not a problem, and no special consideration needs to be made.
--
Dag.
Navigation:
[Reply to this message]
|