orbitter Posted March 3, 2008 Share Posted March 3, 2008 ??? hi there, if anyone can help me could you please show me how to create a countdown timer in php and once the countdown has finished, the web page is then refreshed. thank you Quote Link to comment https://forums.phpfreaks.com/topic/94174-php-countdown-timer/ Share on other sites More sharing options...
discomatt Posted March 3, 2008 Share Posted March 3, 2008 That would be javascript, not php. http://www.javascriptkit.com/script/script2/autofresh.shtml Quote Link to comment https://forums.phpfreaks.com/topic/94174-php-countdown-timer/#findComment-482378 Share on other sites More sharing options...
revraz Posted March 3, 2008 Share Posted March 3, 2008 Could use HTML redirect also if you don't want to use js Quote Link to comment https://forums.phpfreaks.com/topic/94174-php-countdown-timer/#findComment-482384 Share on other sites More sharing options...
orbitter Posted March 3, 2008 Author Share Posted March 3, 2008 thanks, but could i also have a sort of countdown timer that is shown on the webpage using php or html? is that possible? Quote Link to comment https://forums.phpfreaks.com/topic/94174-php-countdown-timer/#findComment-482388 Share on other sites More sharing options...
revraz Posted March 3, 2008 Share Posted March 3, 2008 Not with PHP or HTML. Quote Link to comment https://forums.phpfreaks.com/topic/94174-php-countdown-timer/#findComment-482392 Share on other sites More sharing options...
orbitter Posted March 3, 2008 Author Share Posted March 3, 2008 if i could ask one more question also, i have a number of php files which are being output from mysql. every time the page is refreshed, a random file is output. how is it possible, while randomising, to not make the same file come up twice? Quote Link to comment https://forums.phpfreaks.com/topic/94174-php-countdown-timer/#findComment-482399 Share on other sites More sharing options...
revraz Posted March 3, 2008 Share Posted March 3, 2008 Store the last filename, check it against the new filename, if they match, redo your random routine. Quote Link to comment https://forums.phpfreaks.com/topic/94174-php-countdown-timer/#findComment-482403 Share on other sites More sharing options...
orbitter Posted March 3, 2008 Author Share Posted March 3, 2008 i am a still new with php, do you know any tutorials or anything that can help me with that? Quote Link to comment https://forums.phpfreaks.com/topic/94174-php-countdown-timer/#findComment-482410 Share on other sites More sharing options...
discomatt Posted March 3, 2008 Share Posted March 3, 2008 do { $randomname = sha1(uniqid(rand(), true)) . $extension; } while (file_exists($randomname)); Quote Link to comment https://forums.phpfreaks.com/topic/94174-php-countdown-timer/#findComment-482416 Share on other sites More sharing options...
orbitter Posted March 3, 2008 Author Share Posted March 3, 2008 hey, thank you for the code but it doesnt seem to be working? any ideas as to why Quote Link to comment https://forums.phpfreaks.com/topic/94174-php-countdown-timer/#findComment-482424 Share on other sites More sharing options...
discomatt Posted March 3, 2008 Share Posted March 3, 2008 I'm not sure. This code isn't meant to be copied and pasted, but rather used for reference/ideas Quote Link to comment https://forums.phpfreaks.com/topic/94174-php-countdown-timer/#findComment-482445 Share on other sites More sharing options...
ohdang888 Posted March 4, 2008 Share Posted March 4, 2008 uh... I'm just a intermidate php person, so i'm not for sure on this... But it seems like you'de be albe to do this using php dates. it's be really complicated, but idk. maybe not. Ya, a html redirect would work fine. Why do you want the page to display when it will be refreshed? yOU could just put, "this page will refresh in 10 seconds" Quote Link to comment https://forums.phpfreaks.com/topic/94174-php-countdown-timer/#findComment-482490 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.