Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Php Document Download problem
#1
download_url : http://torrentlee.com/bbs/download.php? ... d=512&no=0

downloaded from the Internet Explorer : OK
but Download error in QM

header send is same all
Why Would not download?

Function test
Code:
Copy      Help
str url1 = "http://torrentlee.com"
str    Download_Url = "/bbs/download.php?bo_table=etc&wr_id=512&no=0"
str    headers =
;Accept: text/html, application/xhtml+xml, */*
;Referer: http://torrentlee.com/bbs/board.php?bo_table=etc&wr_id=512
;Accept-Language: ko-KR
;User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
;Accept-Encoding: deflate
;Host: torrentlee.com
;Connection: Keep-Alive
;Cookie: __cfduid=df42ae21a01cb5546fec6c605ea1f15821432616112; PHPSESSID=difki4nt53jgl4tu660m27clj6; f33d2ed86bd82d4c22123c9da444d8ab=MTQzMjYxNTk1Ng%3D%3D; 96b28b766b7e0699aa91c9ff3d890663=aHR0cDovL3d3dy5nb29nbGUuY28ua3IvdXJsP3NhPXQmcmN0PWomcT0mZXNyYz1zJmZybT0xJnNvdXJjZT13ZWImY2Q9OSZ2ZWQ9MENGRVFGakFJJnVybD1odHRwJTNBJTJGJTJGdG9ycmVudGxlZS5jb20lMkZiYnMlMkZib2FyZC5waHAlM0Zib190YWJsZSUzRGtvcl9kb2N1JTI2d3JfaWQlM0QxNzYlMjZwYWdlJTNENTklMjZwYWdlJTNENTkmZWk9cFB4alZZU0RHWUtDOGdYQzhZRElCQSZ1c2c9QUZRakNORk1tUXlIYlNBQmxrR1E5d3lCRmxIdEZqT1NidyZidm09YnYuOTM5OTA2MjIsZC5kR2M%3D; wcs_bt=e053f97fe46850:1432623268

str Download_Path ResponeHeader
Http h.Connect(url1)
,h.Get3(Download_Url Download_Path 1 INTERNET_FLAG_KEEP_CONNECTION ResponeHeader headers)
,out Download_Path

str FileNamePattern =
;;filename="(.*?)"

ARRAY(str) TorrentName; int i
if(!findrx(ResponeHeader FileNamePattern 0 4 TorrentName)) out "NotFound";ret
for(i 0 TorrentName.len)
,str GetTorrent=TorrentName[1 i]
,,GetTorrent.findreplace("+" "_")
,str path.format("$desktop$\%s" GetTorrent)
,out Download_Path.setfile(path)


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)