PHP Question

They have: 3 posts

Joined: Jan 2001

Hi,

I am creating a topsites page for one of my clients in PHP and MySQL.

How can I make the topsite list reset daily?

Thanks!

Chris Roane

He has: 424 posts

Joined: Mar 1999

You would just need to write a php script that resets the database (deletes the site ranks or something) once a day... Call the script with cron each day, whenever you want.

They have: 3 posts

Joined: Jan 2001

That is what I thought I would have to do, but I have no clue on how to do that. I've never tried to use cron with my host before.

Any help on this would be appreciated.

Chris Roane

SpotForums.com: We just launched! Get involved in this growing site.
InterSurge.com: Updated hosting packages!

They have: 850 posts

Joined: Jul 1999

Create a file called 'cront', and inside it put something like:

0 0 * * * lynx -dump http://www.url.com/to/reset_topsites.php
'
upload the file to your home directory, login to telnet and type
'crontab cront'

This would execute the script via lynx at midnight each night.

Hope that helps

They have: 3 posts

Joined: Jan 2001

Thanks!

Man, that is interesting.

Thanks for your help!

Chris Roane

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.