sunnydrake / serverip-get-datetime
Returns current DateTime for server ip. Uses API from http://worldtimeapi.org .
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/sunnydrake/serverip-get-datetime
Requires (Dev)
- phpunit/phpunit: 8.5.*
This package is auto-updated.
Last update: 2025-12-29 04:00:55 UTC
README
Requirements
This module has no external dependencies. Needs allow_url_fopen set to true in php.ini or code.
Install via Composer
We recommend installing this package with Composer.
Download Composer
To download Composer, run in the root directory of your project:
curl -sS https://getcomposer.org/installer | php
You should now have the file composer.phar in your project directory.
Install Dependencies
Run in your project root:
php composer.phar require sunnydrake/serverip-get-datetime
You should now have the files composer.json and composer.lock as well as
the directory vendor in your project directory. If you use a version control
system, composer.json should be added to it.
Require Autoloader
After installing the dependencies, you need to require the Composer autoloader from your code:
require 'vendor/autoload.php';
Install without Composer
Place the 'ServerGetDateTime.php' file in the include_path as specified in your
php.ini file or place it in the same directory as your PHP scripts.
Usage
Gets DateTime for current IP :
<?php require 'vendor/autoload.php'; var_dump (\Sunnydrake\Serverip\ServerGetDateTime::getDateTime());
Copyright and License
This software is Copyright (c) 2021 by Oleh Marychev.
This is free software, licensed under the GNU Lesser General Public License version 3 or later.
Thanks
Thanks to Oleksandr Roslov oleksandr.roslov@1648factory.com for task.