Skip to content

About

Sleeps to christmas php script.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sleeps 2 Santa

A basic php sleeps until christmas countdown. With options for custom days and or timezones.

Getting Started

To get started just clone this repository into your website, or if you're not bothered about this text just the following files will do:

  • .htaccess
  • index.php
  • error.php

Prerequisites

Any webserver with php. If you're not using apache you'll have to convert the .htaccess file for your chosen webserver.

Using this script

If you call the index.php without any variables it will output the amount of sleeps until Christmas and it will assume you're in the UK

If there are no errors, the script outputs only text, not a html page. This is so it can be used as input for another script or app.

There are xx sleeps to Christmas.

Custom date / timezone

There are 3 custom options:

  • tz: TimeZone any php recognised TimeZone
  • td: Target day. In case you want a day other than christmas, in any format recognised by strtotime
  • tdn: Target day name. So the script will know what to call your day

You can call any number of options or none

/index.php?tz=Europe/Amsterdam&tdn="Dutch Christmas"

License

This project is licensed under the MIT License.

Acknowledgments

About

Sleeps to christmas php script.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages