Blitz doesn't like downloading PHP files
Blitz3D Forums/Blitz3D Programming/Blitz doesn't like downloading PHP files
| ||
i was able to download html and other files, but NOT php files. maybe it is because of the php runtime, which causes a TCP timeout. i don't quite know which code to go for, but here are both: first: WriteLine tcp, "GET " + path$ + filename$ + " HTTP/1.1" WriteLine tcp, "Host: " + host$ WriteLine tcp, "User-Agent: test" WriteLine tcp, "Accept: */*" WriteLine tcp, "" second: eol$ = Chr(13) + Chr(10) WriteLine tcp, "GET " + path$ + filename$ + " HTTP/1.1 " + eol$ + "Host: " + host$ + eol$ + "User-Agent: test" + eol$ + "Accept: */*" + eol$ edit: forgot to add, but both are not working. i had this problem before. this time it doesnt work at all, but previously it was working randomly if you know what i mean... |
| ||
newsflash: PHP and CSS files cant be downloaded. the reason for that is that i don't get a "Content-Lenght:" when reading the tcp stream... thats how a normal header looks like: HTTP/1.1 200 OK Date: Sun, 04 May 2008 14:18:40 GMT Server: Apache/2.2.3 (Debian) mod_ssl/2.2.3 OpenSSL/0.9.8c Last-Modified: Sat, 01 Mar 2008 08:17:11 GMT ETag: "15acb85-1b46-4475bc8110fc0" Accept-Ranges: bytes Content-Length: 6982 Connection: close Content-Type: text/html; charset=none Content-Language: de thats how a header of a php/css file looks like: HTTP/1.1 200 OK Date: Sun, 04 May 2008 14:18:40 GMT Server: Apache/2.2.3 (Debian) mod_ssl/2.2.3 OpenSSL/0.9.8c X-Powered-By: PHP/5.2.5-0.dotdeb.2 Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=none Content-Language: desee, i do NOT get a __Content-Lenght__ information, so i can't download anything :( |
| ||
i try it yesterday with the same "Error" . its your own server then write a php script what sends your the file |
| ||
it seems to be a general problem. i cant seem to download php/css files at all... i just don't get that "Content-Lenght:" information in the header, which is most important! |
| ||
This is because you have this:Transfer-Encoding: chunkedThis basically means that the trasnfer will be made as a series of distinct blocks. See this: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1 |
| ||
i'll work at this and will come back soon. edit:WOW i got it! and since i learned from here how to download fast, i download a complete chunk at once and it is pretty fast, too. thank you so much :) |