views:

121

answers:

2

i coded a random quote generator in php using mysql but also jquery. however when i try to integrate it with facebook, since i opted to use fbml, i could not use jquery.

how do i get the quote to display randomly in php at say, 30 mins, without using jquery or javascript?

+1  A: 

You could use your jquery-made quotes solution in facebook fbml app using the <fb:iframe> tag.

Sarfraz
i'd prefer not to use iframes since it doesn't extend support to profile tabs. that's the reason why i'd like to code the quote generator in php itself without resorting to jquery or javascript.
fuz3d
A: 

Write a script that grabs all quotes from the database, and use rand() to pick one. Then save the quote to a file as you want it to appear. Each time you run the script it should overwrite the file, and your output will just include the file to display the quote.

Then just run your quote chooser as a cron job set to every 30 mins.

Syntax Error