Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
$url = "https://example.com/";
echo "Domain Create Date of $url " . date( 'F Y', strtotime( domainCreate($url) ) ) . " (" . domainCreate($url) . ")";
function domainCreate($url){
$parsed = parse_url( $url );
$domain = trim( $parsed[ 'host' ] );
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, "http://rdap.org/domain/$domain" );
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$data = curl_exec( $ch );
$data = json_decode( $data, true );
curl_close( $ch );
return( $data[ 'events' ][ 0 ][ 'eventDate' ] );
}