Hello,
I have a website for musicians where all users can post their ads for free.
I need a script that send an email for a member user when his ad is going to
be expired (let say after 30 days).
Any ideas ?
Sammy.
Hello,
I have a website for musicians where all users can post their ads for free.
I need a script that send an email for a member user when his ad is going to
be expired (let say after 30 days).
Any ideas ?
Sammy.
You'll need to setup a cron job to check when an ad will expire. For example you can add the creation date of the ad to the database, then check with the cron job for expiring ads.
The cron script can be just a regular PHP script, that is called from cron.
You'll need to setup a cron job to check when an ad will expire. For example you can add the creation date of the ad to the database, then check with the cron job for expiring ads.
The cron script can be just a regular PHP script, that is called from cron.
Yes but the thing is that my site is runing on windows , not unix....
You can also use the windows task scheduler just like cron.
http://technet.microsoft.com/en-us/library/cc721931.aspx
http://www.makeuseof.com/tag/how-to-automate-windows-programs-on-a-schedule/
Or "at" command:
http://support.microsoft.com/kb/313565
Note the program, or command to run would be:
c:/path/to/php.exe -f c:/path/to/your/script.php
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.