Date and Time
-
What is Date and Time
Date and Time is a very simple script that will show the current date and time on your web page. Written in PHP it is a very small file that is incredibly easy to setup and use.
[Back to top] -
What are the requirements for Date and Time
Date and Time only requires that PHP is installed on your web server and you are able to chmod directories.
[Back to top] -
How do I set up Date and Time
Installing the Date and Time script is straightforward.
(1) Unzip the distribution file to your local PC.
(2) Create a directory on your web server root and call it dateandtime.
(2) Upload codelock.php config.php and dateandtime.php to the dateandtime directory you just created.
(3) Chmod the dateandtime directory to 777.
(4) Edit the config.php file to suit your needs using notepad or something similar and save the file back to the server (a full explanation of the variables is given in the file).
(5) Include dateandtime.php in the page where you want it to appear. To do this use the lines below:
<?php
include('http://www.yoursite.com/dateandtime/dateandtime.php');
?>
[Back to top] -
What is the server offset variable for
The server offset variable is used to calculate the difference between your own local time and the time set on the server. This allows the script to show the local time rather than the server time.
If you want, you can set this variable to reflect any time in the world by simply working out the difference in minutes between your server time and the time you want to display.
[Back to top] -
My server time is ahead of my local time. How do I set up the offset variable to take this into account
The server offset variable will take the server time and add any minutes you set. If your server time is behind your local time, then it is a simple matter of working out the difference in minutes between your server time and your local time. For example, if your server time is 1300 and you local time is 1400, you need only set your offset variable to 60. The script will then add that value to the server time before it displays the time on your page. The output from the script will be 'servertime + offset = local time' and therefore the script will display 1400.
If your server time is ahead of your local time then clearly adding an offset to the server time is not going to work unless you work 24 hours ahead. By this we mean that if your server time is 1500 and your local time is 1400 then you must add 23 hours (1380 minutes) as the offset value. The script will then display servertime(1500) + offset in minutes (1380 or 23 hours) = localtime (1400). The script does not care about the date because this is worked out separately. Consequently the script will still show the correct date and now it will also show the correct time.
[Back to top] -
I get an open_basedir restriction in effect error message
If you receive this error message (or something similar that talks about open_basedir restrictions in effect):
Warning: main() [function.main]: open_basedir restriction in effect. File(/usr/lib/php4/php/language/lang-.php) is not within the allowed path(s): (/home/http/vhost/yourdomain.com/httpdocs)
Then your hosts have set some restrictions on your server. Most hosts will be happy to turn off this restriction to allow the script to run. Contact your hosts, inform them of the error message you are receiving and request that they remove open basedir restrictions.
[Back to top] -
I get a failed to create stream: error
If you get this message (or similar)
Warning: Unknown(../dateandtime/config.php): failed to create stream: No such file or directory in /home/httpd/vhost/yourdomain.com/httpdocs/dateandtime/codelock.php(3) : eval()'d code(1) : eval()'d code on line 2
Warning: Unknown(../dateandtime/config.php): failed to create stream: No such file or directory in /home/httpd/vhost/yourdomain.com/httpdocs/dateandtime/codelock.php(3) : eval()'d code(1) : eval()'d code on line 2
Warning: Unknown(): Failed opening '../dateandtime/config.php' for inclusion (include_path='.:/usr/lib/php4/php') in /home/httpd/vhost/yourdomain.com/httpdocs/dateandtime/codelock.php(3) : eval()'d code(1) : eval()'d code on line 2
You will need to chmod your dateandtime directory to 777
[Back to top] -
How can I remove the link to Liquid Frog from the script
This is a free script, as such it generates no income for us. In addition, we have to bear the costs associated with download of the script in terms of bandwidth and ongoing development and all our free scripts are very popular with our site visitors meaning a lot of bandwidth!
We use the link included with the script to generate traffic to this site in the hope that people will purchase one of our paid for scripts or some of our software. Whilst we would love to give away our scripts and not have a link, economic realities dictate otherwise. We give you the script for free - you return that by sending us traffic, we consider this a fair exchange.
If the link spoils the look of your site or you really don't want the link, you can pay a small fee to have it removed. We charge just $7.99 for removal of the link and you can find instructions on how to do this in the Readme.htm file that comes with the script.
[Back to top] -
Can I suggest a way to improve this script
Yes of course. We actively encourage users of our software and scripts to suggest improvements so that they can be developed still further. To make a suggestion please use the contact form on the site and send your comments to feedback.
[Back to top] -
My question wasn't answered in these Faq's. What now
Even though we do not provide support for our free scripts, if you have a problem that doesn't appear in these Faq's, you may email support.
Please include as much detail as possible about the problem and try to indicate under what circumstances the problem occurs. Please also tell us as much about your server as you can such as the version of PHP and MySQL it is running etc.
We want to provide as much help as possible to end users via these Faq's and, if your problem is not already listed you could also help others as well as yourself by requesting support.
Any replies we make to your problem will be mailed directly to you and included in these Faq's for others.
[Back to top]
Powered by ODFaq v2.1.0
|