PHP Classes

PHP Event at Date: Execute action when a given date is reached

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 258 All time: 7,831 This week: 660Up
Version License PHP version Categories
event-at-date 2.0.0Custom (specified...5PHP 5, Time and Date
Description 

Author

This class can execute action when a given date is reached.

It takes a date of a scheduled event and a callback function that should be called when the current day is the specified date.

The class logs to a file a message when the current date matches the event date.

Picture of zinsou A.A.E.Moïse
  Performance   Level  
Name: zinsou A.A.E.Moïse is available for providing paid consulting. Contact zinsou A.A.E.Moïse .
Classes: 50 packages by
Country: Benin Benin
Age: 34
All time rank: 6761 in Benin Benin
Week rank: 195 Up1 in Benin Benin Equal
Innovation award
Innovation award
Nominee: 23x

Winner: 2x

Example

<?php
require_once('./eventatdate.class.php');
function
test(){
    echo
'you are the happy winner of the day call +00220022155418 to claim your gift ';
    return
true;
}
echo
'<pre>';
$date=date('Y-m-d H:i:s');//it's just for making this work for you the first time you launch the script you can choose you own date but respect this format
$exemple=new eventatdate($date,'test','filelog.txt');
var_dump ($exemple);
$exemple->eventapply();



Details

Eventatdate class is a really simple way to make one of your PHP apps users launch once a predefined action when they come on your website. For example: imagine that you want to tell the user who connects at a precise date and time to your website that he is the happy winner of the gift of the day. All you have to do is to add this little script where you want action to be lauched and all is done... The class use a file log to control whether or not action needs to be launched. For a how to use example see the testevent.php file. Bug reporting to leizmo@gmail.com or simply use the dedicated forums to ask your questions...

  Files folder image Files (4)  
File Role Description
Plain text file eventatdate.class.php Class eventatdate class
Accessible without login Plain text file license Lic. license
Accessible without login Plain text file readme Doc. readme
Accessible without login Plain text file testevent.php Example example script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:258
This week:0
All time:7,831
This week:660Up