RE: The files are accessible through a URL?, Roger Harris, 02-23-2006
by Phil, February 23, 2006 14:11
Thx... I tried httpget yesterday and it didn't work; it works today... may be I was too tired. Here is my piece of code -with some french in it for practice ;-) WHILE loop is to extract the file name from a full qualified url.
<% SET trec = 75; DATABASE DSN=abcbase; SQL SELECT * FROM table WHERE prec = $trec$; SET pdown = $pnbrdowload$ + 1; NOTE SQL UPDATE; [to update counter] SET posfile = len($pnomfichier$), plienfichier = $pnomfichier$; WHILE $posfile$ > 0; SET posfile = pos($pnomfichier$,"/"); SET pnomfichier = $mid($pnomfichier$,$posfile$ + 1, len($pnomfichier$) - $posfile$); ENDWHILE; HEADER "Content-type: application/octet-stream"; HEADER "Content-Disposition: attachment; filename=$pnomfichier$"; HEADER "Connection: close"; HEADER ""; SETOPTION output_mode=B; HTTPGET http://$plienfichier$; EXIT; %>
Thx Roger for these nearly 10 years of support... I used ODBiC I guess around 1996-1997 for the first time on a Netscape server under Windows NT..
Name E-mail optional TopicMessage:
HTTP Link: Link text: