PHP Question
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
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
Chad Simper posted this at 00:16 — 23rd January 2001.
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.
Chris Roane posted this at 00:24 — 23rd January 2001.
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!
Rob Pengelly posted this at 00:37 — 23rd January 2001.
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
http://www.thehungersite.com - http://www.therainforestsite.com
http://www.ratemymullet.com - Beauty is only mullet deep.
Chris Roane posted this at 00:42 — 23rd January 2001.
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.