virtuexru Posted August 1, 2007 Share Posted August 1, 2007 OK. Say a user hits a php page of mine, how can I set a 'wait 30 seconds to download' script? And it'll countdown or just show the link after 30 seconds? So example would be Wait 30 seconds please... *after 30 seconds* Click here to download Quote Link to comment https://forums.phpfreaks.com/topic/62776-how-to-create-a-wait-seconds-to-download-script/ Share on other sites More sharing options...
teng84 Posted August 1, 2007 Share Posted August 1, 2007 i think you have to use the onload() JAVA SCRIPT Quote Link to comment https://forums.phpfreaks.com/topic/62776-how-to-create-a-wait-seconds-to-download-script/#findComment-312539 Share on other sites More sharing options...
lightningstrike Posted August 1, 2007 Share Posted August 1, 2007 You could use also use an AJAX method which makes a request every x seconds requesting for the URL. Verifying the user has waited enough time through logs, etc. Quote Link to comment https://forums.phpfreaks.com/topic/62776-how-to-create-a-wait-seconds-to-download-script/#findComment-312543 Share on other sites More sharing options...
btherl Posted August 1, 2007 Share Posted August 1, 2007 I've seen one site which stored the link in an encoded form, waited in javascript, and then used javascript to decode the link and place it in the page. Not a perfect solution, since it can be decoded manually by the user. Quote Link to comment https://forums.phpfreaks.com/topic/62776-how-to-create-a-wait-seconds-to-download-script/#findComment-312599 Share on other sites More sharing options...
cooldude832 Posted August 1, 2007 Share Posted August 1, 2007 yes ajax be best here and to top it off store the file as binary in a database and make it a temp file for download then delete each time (if it ain't very big) if its a script you don't have to go binary just a blob or text would do you fine. Quote Link to comment https://forums.phpfreaks.com/topic/62776-how-to-create-a-wait-seconds-to-download-script/#findComment-312601 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.