Skip to content

Composer package. Returns current DateTime for server ip. Uses API from http://worldtimeapi.org

Notifications You must be signed in to change notification settings

sunnydrake/serverip-get-datetme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SunnyDrake's Server IP Get DateTime PHP Lib with worldtimeapi.org API

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.

About

Composer package. Returns current DateTime for server ip. Uses API from http://worldtimeapi.org

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages