This is a simple PHP script that allows you to check the age of a domain using the Iodev Whois library and store the result in a MySQL database for later use.
- Clone this repository.
- Install dependencies using
composer install. - Create a new MySQL database and run the following SQL statement to create the necessary table:
- Edit the .env file with your MySQL database credentials.
- Upload the files to your web server.
CREATE TABLE domain_data (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
entryTime INT NOT NULL,
age VARCHAR(255) NOT NULL,
PRIMARY KEY (id),
UNIQUE KEY (name)
) ENGINE=InnoDB;
To check the age of a domain, make a GET request to the script with the domain parameter set to the domain you want to check. For example:
https://example.com/domain-age-checker/?domain=example.com
The script will return the age of the domain in Unix timestamp format. If the domain has been checked within the last 30 days, the script will return the age stored in the database.