345dfg Posted July 22, 2010 Share Posted July 22, 2010 Hi guys, I happen to be clueless about PHP. I want to create a section on my website that rotates content (like a slideshow). It should be able to rotate any type of html content (images and text). An example of a site that does something similar is: http://www.fordgt.org. However, I'm NOT looking for javascript code. If possible, I should be able to set the amount of seconds each html area appears. People who visit the website use both IE and Firefox. I have searched online with queries like php rotator, php content rotator, php slideshow etc but I haven't been able to find something that looks easy enough to implement. Could someone point me in the right direction, please? Thanks, George Quote Link to comment https://forums.phpfreaks.com/topic/208509-rotate-html-content-slideshow/ Share on other sites More sharing options...
dezkit Posted July 22, 2010 Share Posted July 22, 2010 this can only be done in a client side script. javascript is one of the only choices Quote Link to comment https://forums.phpfreaks.com/topic/208509-rotate-html-content-slideshow/#findComment-1089428 Share on other sites More sharing options...
BillyBoB Posted July 22, 2010 Share Posted July 22, 2010 or you could use flash Quote Link to comment https://forums.phpfreaks.com/topic/208509-rotate-html-content-slideshow/#findComment-1089429 Share on other sites More sharing options...
timvdalen Posted July 22, 2010 Share Posted July 22, 2010 You can use PHP to get the HTML with JavaScript though, if you really want to use PHP. There's a great article on php.net about it, but I can't seem to find it now. I hope someone else on the forums can. Quote Link to comment https://forums.phpfreaks.com/topic/208509-rotate-html-content-slideshow/#findComment-1089454 Share on other sites More sharing options...
jd307 Posted July 22, 2010 Share Posted July 22, 2010 Because PHP is a server-side language, all it can do is serve a single piece of content. Once the client's browser has been sent the data, PHP no longer plays a role in what happens... basically meaning a timer in PHP (such as usleep) would only stop the server from processing scripts until the end of the counter and then resumes, which would only cause a delay on the browser receiving the HTML page. For your requirements, you would need something working on the client-side to control the rotation between the different content. Quote Link to comment https://forums.phpfreaks.com/topic/208509-rotate-html-content-slideshow/#findComment-1089457 Share on other sites More sharing options...
345dfg Posted July 22, 2010 Author Share Posted July 22, 2010 Thanks for the responses everybody. Much appreciated. George Quote Link to comment https://forums.phpfreaks.com/topic/208509-rotate-html-content-slideshow/#findComment-1089655 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.