Click here to Skip to main content
15,892,161 members
Home / Discussions / Web Development
   

Web Development

 
QuestionWeather.Com HTML Code: Add function to request and save (client-side) Zip Code and substitute for VAR is Weather.Com Script-Need Help Pin
bill bradley14-Apr-10 1:40
bill bradley14-Apr-10 1:40 
QuestionHow to make an automatic download web page ? Pin
Western_Star_Entertainment13-Apr-10 11:25
Western_Star_Entertainment13-Apr-10 11:25 
AnswerRe: How to make an automatic download web page ? Pin
Not Active13-Apr-10 12:24
mentorNot Active13-Apr-10 12:24 
GeneralRe: How to make an automatic download web page ? Pin
hb5213421415-Apr-10 3:39
hb5213421415-Apr-10 3:39 
GeneralRe: How to make an automatic download web page ? Pin
Not Active15-Apr-10 3:56
mentorNot Active15-Apr-10 3:56 
GeneralRe: How to make an automatic download web page ? Pin
hb5213421415-Apr-10 4:34
hb5213421415-Apr-10 4:34 
GeneralRe: How to make an automatic download web page ? Pin
Not Active15-Apr-10 5:02
mentorNot Active15-Apr-10 5:02 
AnswerRe: How to make an automatic download web page ? Pin
Jayapal Chandran5-May-10 21:58
Jayapal Chandran5-May-10 21:58 
Create a php page (if you are using php or just modify the code to suit your language. The concepts are the same because we are dealing with HTTP so languages dosent matter).

Add this code...
http://vikku.info/codesnippets/php/force-download-authenticated-download/[^]
---
$filename = "anyfolder/anyfilename.ext";<br />
header("Cache-Control: no-store");<br />
header("Expires: 0");<br />
header("Content-Type: application/octet-stream");<br />
header("Content-disposition: attachment; filename=\""."anyname.ext."\"");<br />
header("Content-Transfer-Encoding: binary");<br />
header('Content-Length: '. filesize($filename));<br />
readfile($filename);

---

just give a link to this file...
the result is this page will not load instead the download dialog box is triggered and this is the one you were expecting...

so as the previous person has posted...

window.setTimeout("location to the file",3000) // after three seconds...

location to the file should be replaced like this
window.location = 'folder/filename.ext'

thats it... done.
Today's Beautiful Moments are
Tomorrow's Beautiful Memories

Questionplz help Pin
shivee13-Apr-10 5:29
shivee13-Apr-10 5:29 
AnswerRe: plz help Pin
T M Gray14-Apr-10 11:35
T M Gray14-Apr-10 11:35 
QuestionGenerated proxy class not appearing in solution explorer Pin
mnemonic6913-Apr-10 1:25
mnemonic6913-Apr-10 1:25 
AnswerRe: Generated proxy class not appearing in solution explorer Pin
Martin Jarvis13-Apr-10 20:57
Martin Jarvis13-Apr-10 20:57 
GeneralRe: Generated proxy class not appearing in solution explorer Pin
mnemonic6913-Apr-10 22:08
mnemonic6913-Apr-10 22:08 
GeneralRe: Generated proxy class not appearing in solution explorer Pin
Martin Jarvis13-Apr-10 22:50
Martin Jarvis13-Apr-10 22:50 
QuestionBook recommendations on developing commercial Websites? Pin
fjparisIII11-Apr-10 10:34
fjparisIII11-Apr-10 10:34 
AnswerRe: Book recommendations on developing commercial Websites? Pin
Dalek Dave11-Apr-10 11:15
professionalDalek Dave11-Apr-10 11:15 
GeneralI'll try to be more specific about what I need Pin
fjparisIII11-Apr-10 13:18
fjparisIII11-Apr-10 13:18 
GeneralRe: I'll try to be more specific about what I need Pin
Not Active11-Apr-10 15:11
mentorNot Active11-Apr-10 15:11 
GeneralRe: I'll try to be more specific about what I need Pin
fjparisIII11-Apr-10 18:18
fjparisIII11-Apr-10 18:18 
GeneralRe: I'll try to be more specific about what I need (SOLVED!) Pin
fjparisIII11-Apr-10 18:41
fjparisIII11-Apr-10 18:41 
GeneralRe: I'll try to be more specific about what I need (SOLVED!) Pin
User 171649211-Apr-10 21:42
professionalUser 171649211-Apr-10 21:42 
GeneralRe: I'll try to be more specific about what I need (SOLVED!) Pin
fjparisIII12-Apr-10 5:17
fjparisIII12-Apr-10 5:17 
GeneralRe: I'll try to be more specific about what I need (SOLVED!) Pin
Not Active12-Apr-10 5:36
mentorNot Active12-Apr-10 5:36 
GeneralRe: I'll try to be more specific about what I need (SOLVED!) Pin
User 171649212-Apr-10 5:49
professionalUser 171649212-Apr-10 5:49 
GeneralRe: I'll try to be more specific about what I need (SOLVED!) Pin
fjparisIII12-Apr-10 6:08
fjparisIII12-Apr-10 6:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.