PHP 7 MySQL Script to Build Domain Age Checker SEO Tool in Browser Using Javascript
Dec 21, 2025
Buy the full source code of application here:
https://buy.stripe.com/fZe8zQd3zcx27fy05X
Show More Show Less View Video Transcript
0:06
Uh hello friends today in this tutorial
0:08
I'll be showing you that how to build a
0:11
domain age checker SEO tool inside PHP
0:13
and MySQL database. So with the help of
0:17
this PHP script you will be able to know
0:19
the exact domain age of the website.
0:22
So let me just show you the demo of this
0:25
PHP script here. So I am using exam
0:29
control panel to execute this PHP script
0:31
here. You can see I have started this
0:32
Apache server here
0:35
and uh I am just uh running this PHP
0:37
script localhost/domainage
0:40
and here you need to provide the
0:41
parameter which is domain is equal to
0:44
and then the address.com.
0:46
So now this will be printing the domain
0:49
age which is 16 years 76 days. You can
0:52
change the address here. Let's suppose
0:54
my website coding section you will see
0:57
that it will 3 years 265 days
1:02
and you can change free media tools.com
1:05
you can see that 1 year 264 days you can
1:09
change to google.com so in this easy way
1:12
you can develop a domain age checker
1:14
tool here inside PHP with the help of
1:16
the script so we will be storing all
1:18
these data inside the MySQL database and
1:21
we and we will be displaying it inside a
1:24
bootstrap table. So you can just also
1:28
write like this http colon
1:31
uh google.com
1:33
this will also be the same.
1:39
So you can try out any com combination
1:42
how you write here www.github.com.
1:46
So there is no restriction that you if
1:48
you write here http or www.
1:51
So in all the situations it will work
1:54
and it will give you the domain age of
1:56
the website in uh years and days like
2:00
this. So let's start building this
2:02
application from scratch guys. I have
2:04
given this PHP script inside the video
2:08
description. So just go to the edit
2:11
option and you will be seeing this PHP
2:13
script in the video description of the
2:15
live stream. So if you want to copy all
2:17
the source code, you can go to my blog
2:18
post and I have written all the source
2:21
code here. So let's start. So first of
2:24
all guys, you need to install exam
2:26
control panel. It's a piece of software
2:28
with the help of which you deploy PHP
2:30
scripts inside your local system. So
2:32
simply download this software. I have
2:34
already downloaded it and you need to
2:36
start your Apache server and also you
2:39
need to start the MySQL database server
2:41
as well. Go to the admin section and
2:45
here we will be creating a simple
2:46
database. So we will create a new
2:49
database which will be called as domain
2:54
and uh
2:56
domain age. We will create the database
2:59
domain age. Inside this database we will
3:02
create another table which will be
3:03
domain. Number of columns will be three.
3:10
Three columns will be there. And uh
3:13
first will be the id which will be the
3:15
primary key. So we need to have auto
3:19
increment to all here.
3:21
So auto increment there is auto
3:24
increment option here which is the
3:26
primary keys. This will be auto
3:27
incremented. The second option will be
3:30
the actual domain
3:32
and then domain age
3:38
or simply age.
3:42
So here guys this will be vchart and
3:45
this will also be vchar. So 256
3:49
256. So this is our table here. So
3:52
simply create this table here. So we
3:55
have these three columns out there which
3:57
is the ID, domain and the age. So we
4:01
will be showing all these data inside
4:03
this table. So let's start building now.
4:06
So right here inside my root directory I
4:09
will make a simple
4:11
uh let me rename this to domain age
4:17
dot php
4:19
and here we will be making index dot
4:21
php.
4:22
So right here guys we need to write u we
4:26
will be having this uh domain a checker
4:32
tool in PHP and my SQL
4:36
and for this we will be using bootstrap
4:38
CDN. So you just need to go to bootstrap
4:43
CDN just type it and uh w3schools.com
4:47
website will come here and you need to
4:50
simply grab the CDN. So right here
4:55
grab the CDN and also we will use jQuery
4:59
as well. So simply copy this and paste
5:02
it after the body
5:05
and after this
5:09
we will have simple input field out
5:12
there. So container class of bootstrap
5:16
and uh inside this we will have a simple
5:18
heading
5:21
domain a checker
5:24
in PHP and MySQL.
5:30
So now if you open this application here
5:33
in the browser
5:38
so you will see that domain a checker in
5:40
PHP and MySQL. So here we need to simple
5:43
input field here. So
5:48
form container.
5:52
So we need to wrap this inside the form
5:55
tag.
5:57
So we will not be providing action
5:59
attribute. Still we will give a id to it
6:02
of form.
6:06
We will target this inside JavaScript.
6:08
So here
6:11
form group and inside this we will have
6:14
uh
6:15
a input field we will attach the
6:18
bootstrap class to it form container
6:20
input type text and we will give the id
6:24
to it of URL
6:28
and the placeholder will be
6:33
simply you need to write the domain name
6:35
here and it should be required.
6:38
So we will also be giving a label to it.
6:43
Enter domain name.
6:48
So now if you refresh it, you will see
6:50
this input field out there. Enter domain
6:52
name.
6:54
I think we have given it wrong class
6:57
name. This needs to be
7:00
form
7:02
group I think.
7:10
If you see, let me refresh it. Uh
7:16
Bootstrap,
7:19
if you see in, if I go to the input
7:22
fields out there,
7:24
there is a class out there
7:28
uh form group. Oh, sorry, this is form
7:31
control.
7:38
So now if you refresh it
7:42
you will see that now after this we need
7:44
a simple button which will submit the
7:47
form.
7:53
So these are all bootstrap classes.
8:00
Get domainage.
8:06
You can see that. So,
8:18
so now we after we submit the form, we
8:20
need to write now the Java jQuery code
8:23
here. So, just put script tag here.
8:29
So, we have attached you will see we
8:31
have attached a unique ID to the form
8:34
here which is form. So, now we need to
8:36
target this. So we will simply write
8:38
here like this form. So when the form
8:41
submits
8:43
this call back function will execute
8:47
and we will first of all prevent the
8:49
auto submission of the form and then we
8:52
need to get the domain name which user
8:56
enter.
8:58
So we can get the domain name like this.
9:01
we can given the id to it of URL
9:06
dot val. You can see that we have given
9:09
the id.
9:11
So now we need to make a ajax request to
9:14
the php script.
9:18
So we will use dollar dot ajax method
9:24
or also we can use like this dollar dot
9:32
post.
9:34
Oh, let me use Ajax only.
9:38
So here method will be post
9:41
URL will be this URL we are passing to
9:44
this domain do.tphp dot php
9:52
and the data which we'll be passing here
9:55
is the actual domain which is present
9:58
inside domain. So when it is successful
10:03
this
10:05
call back function will return this
10:07
data. So we will check if
10:10
data is equal to success
10:16
then we will just compare it.
10:23
So now inside domain age dotphp we will
10:27
get this
10:29
using dollar.post.
10:31
So here we need to configure it the
10:34
script
10:40
and you will see that it is echoing out
10:43
the domain age. You will see that like
10:45
this
11:02
So let me see.
11:09
Uh I think we can console log this data
11:13
like this or simply display it in a
11:15
alert box like this.
11:21
So now if I
11:26
execute this application in the browser,
11:28
if I type a domain name, let's suppose
11:30
google.com. Click on get domain age. You
11:34
will see now this will display the age
11:36
in a alert box that is it is 24 years
11:39
276 days old. If I change the domain age
11:42
to zap.com,
11:45
you will now see 16 years 76 days.
11:49
codings.com my website which is
11:54
3 years to 65 days old. So you can also
11:57
change you can also write like this http
12:00
google.com in any combination it will
12:03
display the age. So www. uh
12:08
medium.com
12:12
you can see that
12:14
or https
12:17
www.omegal.com omegal.com
12:21
138 you can see that so each and every
12:23
combination is working right now so five
12:26
people are watching the stream so first
12:28
of all hit the like button subscribe the
12:30
channel as well so now we need to insert
12:32
the details that we are coming here into
12:34
the database so what we can do is that
12:36
we can write a simple script here
12:40
uh after we calculate this so here when
12:44
we are inside our success
12:48
We can call another Ajax
12:53
PHP script which will
12:57
insert data to database.
13:02
So for this guys it is very easy. We
13:04
will again call Ajax and here the method
13:07
will be here again post
13:10
and the URL will be insert data dot PHP
13:16
and uh what is the data that we are
13:19
passing? We are passing the domain
13:22
and we are also passing the age which is
13:24
present inside this data
13:27
or we can simply name this as age like
13:30
this.
13:32
So now when it is successful
13:37
we will get the data here. When it is
13:40
successful we can display it inside the
13:42
table. So now what we need to do is that
13:44
we need to create this uh insert data
13:48
dot PHP file and also first of all we
13:52
need to connect to the database. So we
13:54
will have uh db.tphp which is database
13:58
connection. So right here we need to
14:00
connect to the database. So
14:04
we can once again
14:07
call MySQL I connect
14:11
localhost
14:12
root
14:15
password is empty and the database which
14:17
we have created is uh if you check here
14:20
we have created
14:24
uh seven uh first of all hit the like
14:26
button subscribe the channel as well
14:28
guys uh you can see we have created this
14:31
database which is called as uh
14:35
domain h.
14:38
So here we need to supply this value
14:40
domain h.
14:43
So that's it. So here we need to
14:46
make a connection variable. This will be
14:49
present like this. That's it. You need
14:51
to write inside this file. So this is
14:53
our database connection. We are
14:55
successfully connected to it. You can
14:57
also cross check also. just uh
15:01
execute this file here db.tphp.
15:06
So we can simply uh
15:10
have a if condition if the database
15:13
connection is successful then we can
15:15
echo out that connection
15:18
successful
15:21
or in the else statement we can say
15:25
connection not done.
15:29
So now if you see if I execute this you
15:32
will see connection successful. So if I
15:34
make any sort of mistake here
15:37
now it will say connection you can see
15:41
connection not done access denied for
15:42
user. So in this way you can just do the
15:45
exceptional handling like this error
15:48
handling. So this is your file here. Now
15:51
we need to write this insert data dot
15:53
php. So right here we need to cache the
15:57
data which is coming here. We will use
15:59
the is set method here. So dollar.post
16:04
domain
16:06
and also we need to get the domain h
16:09
which is coming from the index file
16:12
h. So if both the variables are set
16:16
first of all we need to include
16:21
uh our database connection file.
16:26
After this we need to
16:29
insert this
16:31
to the table.
16:33
So for this we need to write a simple
16:36
SQL query that insert into and what is
16:39
the table name we have configured here.
16:42
You will see that the table name is
16:44
domain. So simply we will say domain
16:49
and here we need to provide the column
16:51
names here. So what are the columns
16:53
name? uh primary key will get inserted
16:56
automatically. So we need to write
16:57
domain and age
17:02
domain h and what are the values?
17:06
So the values are present.
17:09
So we need to catch this. So
17:13
domain uh like this
17:19
domain and
17:21
age.
17:27
So we need to insert this. So we can do
17:29
like this.
17:38
So now we need to insert this to the
17:40
database. So we can simply execute this
17:43
query. MySQL query pass the connection
17:47
object and also pass the SQL statement.
17:52
So this will run here and uh this will
17:54
be storing inside result. So now we can
17:57
compare it if result.
18:03
So we can say inserted successfully.
18:14
We can simply display this in the alert
18:17
box. So like this. So if I execute now
18:21
my application here.
18:26
So if I type here google.com and uh
18:29
click you will see connection successful
18:31
inserted successfully. So now if I check
18:34
my table you will see that one entry
18:37
should be there
18:39
uh google.com and age is inserted you
18:42
will see 24 years 276 days. So once
18:45
again if I take another example
18:48
uh facebook.com
18:51
click you will see now refresh it two
18:55
entries are there you will see that
18:58
so now we need to display this data
19:00
whenever we load the application for the
19:02
very first time inside the table. So
19:04
what we can do is that we can simply
19:08
have a PHP script here
19:11
which will get all this data for us.
19:16
So we don't need anything like this. So
19:22
uh we can delete this alert statement.
19:28
So right here when we load the
19:29
application here in the index dot PHP
19:31
file we can execute a PHP block here and
19:36
uh
19:40
we can include
19:42
uh our connection file which is db.tphp
19:45
php and here we can write a simple SQL
19:48
query that we need to select everything
19:51
from our domain table
19:56
and now we need to execute this. So we
19:59
can simply say uh
20:02
result
20:04
my SQL I query pass the connection
20:07
object and also the SQL
20:13
and
20:14
we need to get this inside this uh
20:17
associative array. If you see how to get
20:19
the data from the table
20:22
uh there is this select data syntax
20:25
here. So you will see connection query
20:29
SQL
20:33
you execute this. So
20:37
you can get like this.
20:42
Uh
20:45
we can check here if result
20:50
numbers
20:52
uh
20:57
is greater than zero.
21:06
So this block of code we don't need to
21:10
write here. What we can do is that
21:14
wherever we need to display the table
21:16
after the form here we need to display
21:18
the table. So the table here will be
21:24
here we would display this. So this will
21:26
have a simple table class
21:30
table head.
21:36
So there will be two table headings here
21:39
which will be domain
21:44
and domain age.
21:51
So after this guys we will have a table
21:53
data here table data tag. So inside this
21:57
we need to
22:01
display it just after this table head
22:05
table body starts here. So here
22:09
we need to display it.
22:13
So right here we will have the PHP tags
22:15
here like this.
22:19
So here we need to
22:23
check for this. So
22:29
let me paste it.
22:49
And here we can use the while loop.
23:21
So inside this is somewhat complicated
23:24
guys but uh it is very much easy. You
23:27
will see we are getting the result out
23:29
there inside this result variable and
23:31
then we are having this associative
23:34
array. So now we can get each value here
23:38
inside this. So,
23:44
so here what we need to do is that
24:00
uh here we need to close Yes.
24:20
Uh in between these we will have the
24:22
table rot.
24:35
And here we will write our uh
24:39
this one.
24:44
We will open the PHP tags
24:48
echo.
24:51
So this will be for the domain.
24:56
Put a semicolon.
24:58
And similarly we will display it for uh
25:03
the age.
25:08
Hopefully this this will do. If I
25:14
it is saying that uh on line 94
25:47
If I now execute it.
26:22
Uh, syntax error unexpected end of line
26:27
domain age is index.php. PHP
26:44
uh I don't know what is the
26:55
you can see that guys uh the data is
26:57
successfully inserted into the database.
26:59
It is just the problem of displaying it
27:01
whenever you load the application.
27:04
So
27:06
let me just figure out if I can do solve
27:09
this problem.
28:12
So now you can see that guys it is now
28:15
displaying it. So now we simply need to
28:18
change this code here slightly.
28:25
Here we will have our table row
28:33
table data
28:39
and we will open the PHP tag here and uh
28:44
here we will display the
28:49
domain. Okay.
28:55
So we will repeat this for domain h.
29:04
Hopefully now this will execute
29:08
uh undefined variable row. Let me see uh
29:56
If you see the column names here uh it
29:58
is domain and age. So the column names
30:01
are right.
30:08
Seven people are watching the stream
30:09
guys. So first of all hit the like
30:11
button subscribe the channel. So here in
30:13
this tutorial we have successfully
30:15
inserted the domain age and domain name
30:17
inside the MySQL database. So this is
30:20
the simple PHP script here which allows
30:22
you to find out the domain age of any
30:24
website. So we have inserted the data to
30:27
the database but we are just trying to
30:29
display it on the web page.
30:34
So it is just giving me some error here.
30:37
Oh,
30:56
and let me type
31:18
uh table name. Let me see what is a
31:20
table which domain
31:25
order by
31:58
I think it is giving me some error guys.
32:01
If you know you can comment what is the
32:04
error right now. Let me check.
32:11
I think it is giving me some error here.
32:15
Great content bro. Can you make series
32:17
on flask also? Yeah, definitely I will
32:20
make make series on Python also.
32:24
Uh hello bro from Madhur is saying
32:35
so I will leave here guys. So let me
32:38
update this code here
32:40
uh
32:42
in the blog post so that you can copy
32:45
all the source code here
32:47
which is this index code.
32:53
In the future I will update this code
32:55
once I found the solution for displaying
32:57
it in the table.
33:00
So in the meantime you can copy this
33:03
source code
33:06
insert data
33:26
and dbt php Okay.
33:50
Let me update this. So you can go to the
33:52
video description link to copy all this
33:55
source code. So there is just one
33:57
problem. it is not displaying this
34:00
you know your live while loop the
34:02
variable row is undefined uh so that's
34:05
the problem
34:07
that is the problem I failed to
34:10
understand but uh why it is undefined
34:13
you see
34:16
this uh
34:21
why it is undefined I don't know because
34:24
row is uh defined here you can see that
34:41
uh row can see that
35:59
I don't know what is that problem which
36:02
is occurring here.
36:05
Uh
36:38
Let me try now. I think I was missing
36:40
this PHP tags. That's why
36:49
91
37:58
I'm failed to understand what error is
38:00
coming here because the syntax looks
38:02
pretty good but in programming you don't
38:07
know whenever you get error So
38:14
I think you like PHP very lot because I
38:18
think two three videos I'm making right
38:20
now very high watching is coming. So
38:26
the subscribers are really enjoying this
38:28
content. So
38:31
where you get the result? Echo that
38:33
variable
38:35
on the top of the PHP page.
38:43
PHP is good.
38:46
So which kinds of projects you would uh
38:49
love to see in the future? Can you just
38:52
list it in the chat? If my info based
38:55
article length is 650 words, can ASOic
38:58
ads pay pay well?
39:02
Yeah, definitely longer the article
39:05
uh maximum advertisements can appear on
39:08
the article. So it is very good for
39:11
earning purposes. So definitely Zoic
39:14
will be very much popular when you have
39:17
long form of content especially 650
39:20
words is quite good.
39:23
try to reach thousand words which will
39:25
be good. Gopal is saying PHP API
39:28
projects which API you are talking
39:31
about.
39:37
Can you just give me some options which
39:42
projects you are talking about? Give me
39:45
some options like project which can help
39:48
to make life eas like integrating Python
39:51
machine learning in a web application
39:55
machine learning
39:57
Twitter. Sir please make a video on how
40:00
to do add Hindi front Hindi font in
40:04
ffmppg.
40:07
You meant to say Hindi font in uh videos
40:11
and uh
40:13
images,
40:15
Twitter API project,
40:20
Facebook as well, Facebook,
40:24
Google as well, YouTube video upload
40:27
project as well which is quite good.
40:30
It's give it's give an error showing
40:33
that uni code language can't support
40:37
PHP has PDF libraries as well. So I
40:41
think that a lot of open-source
40:43
libraries are also available in PHP if
40:46
you want to develop projects. So
40:48
definitely I will be looking at those
40:50
libraries to make projects on. So this
40:55
this file that I found on internet
40:58
someone has written this file which
41:01
exactly found uh solved the problem of
41:03
finding the domain age. You just need to
41:06
input the domain and it will give the
41:09
domain age. So various people have
41:11
written the source code in PHP for the
41:15
problem. So definitely I will search
41:20
more of these libraries in PHP to make
41:25
projects like this which will involve
41:27
MySQL database.
41:30
Some other database are also there
41:32
something as uh which are
41:36
somewhat popular to MySQL. Can you list
41:39
the database
41:41
which I am forgetting? I think
41:44
MongoDB is there.
41:48
And uh some other database if you can
41:52
recall
41:58
uh if you see if I
42:02
top database
42:04
in programming
42:07
so MongoDB is one popular then MySQL
42:10
Oracle yeah Oracle is there post postsql
42:18
and elastic search.
42:23
So I would love to just make a project
42:26
in each of these database with PHP just
42:29
showing you how to just integrate it.
42:32
Post SQL, MongoDB,
42:36
elastic search is also there.
42:47
No SQL. Yeah, no SQL is also there
42:51
which is quite good. No SQL database.
42:54
Yeah.
42:58
No SQL is also there.
43:02
And mind you guys, my website is back
43:04
here. I changed it from Hostinger to
43:08
Digital Ocean. So many people were
43:10
talking that free media tools were
43:12
website were down. They can't access the
43:15
website. So I just moved today from
43:19
hostinger to digital ocean. So now you
43:22
can access this website. All the tools
43:24
are available. If you want to buy this
43:27
source code of this website, you can buy
43:29
this for,000 rupees. You will see that
43:33
using credit card or ATM or UPI.
43:37
You can see that
43:40
so this website is back here. So you can
43:42
use this
43:45
and many uh people say that tools are
43:48
not working. The tools are not working
43:50
because uh I haven't purchased the VPS
43:52
plan because it does require a lot of
43:55
processing to run these tools in the
43:58
background. Some uses FFMPG and image
44:00
magic. So you need to purchase a higher
44:03
hosting plan to run these all these
44:05
tools which are there. Some of these
44:08
tools are not just working.
44:11
Majority of the tools are working. So
44:13
just make sure that you have the hosting
44:17
to back it up. The coding is correct of
44:20
these tools. It is made in pure NodeJS
44:23
Express and uh JavaScript.
44:26
So
44:28
majority of the tools such as this tool
44:30
which is bulk side down checker, it
44:33
doesn't rely on processing power. It
44:35
just allows you to
44:38
you just need to
44:41
write the domain names and then it will
44:44
tell you which websites are up and down.
44:49
Tools like this doesn't require you to
44:53
have the processing power.
45:07
Um so please show me add Hindi text and
45:10
draw text in ffmpg please. Yeah, in the
45:13
next video I should definitely solve
45:15
this problem to how to add Hindi text
45:18
using ffmpg
45:22
also Hindi font. I have an application
45:24
that generates a PDF after feeding the
45:26
required information. I want to embed QR
45:29
code inside the PDF. Do you have any
45:32
idea about that? Various libraries
45:34
support that. I think uh FPDF library
45:40
supports that embedding of uh
45:45
QR code inside PDF. MPDF is also in I'm
45:49
talking about PHP libraries
45:52
TC PDF also. So I will make a video on
45:57
this for purpose.
45:59
Where should I send code? You can send
46:02
it to the email address. Just send it to
46:05
Geeky Gotham 1997.
46:17
Thank you so much sir waiting for it and
46:19
all your fmpg codes are working well and
46:23
I learned a lot of thank you. Thank you
46:26
if you have learned from me
46:29
of this. So
46:36
let me also show you the ISOIC earnings
46:39
as well guys. So if you're talking about
46:41
uh ISOIC earnings
46:44
isoic
46:46
as you know that my core update happens
46:50
due to that the traffic also has
46:52
decreased and also earnings I can't say
46:56
it has decreased or increased it is
46:58
staying in between but certainly the
47:01
traffic has slightly decreased due to
47:03
the core update but I'm hoping that this
47:06
will increase over time you will see
47:08
that the Traffic is relatively declining
47:14
in the last 7 to 14 days whenever the
47:17
update started.
47:19
But I am hopeful that whenever the July
47:23
month come that traffic will increase.
47:26
You will see that
47:28
it is slightly in the lower side.
47:36
Now you can see how it is just blurring
47:38
it
47:40
after the update happened in 25 May
47:44
happened. The update started on 25th May
47:47
and it ended on uh I think 10th June. So
47:52
you can just see that downward curve.
47:54
Many website publishers hit by this
47:56
update and also ISOIC revenue also hit
47:58
by this update. Many website publishers
48:01
also lost a lot of revenue to due to
48:03
this update.
48:05
So that's why I'm expecting this to
48:09
resolve pretty quickly. You will see
48:13
never happened this downward curve and
48:15
see
48:28
any NodeJS package for this. Please make
48:31
a video for this. Yeah, definitely I
48:33
will make a video on this. Replace the
48:35
table tag with this.
48:38
I am stuck this problem.
48:41
Doc template asking money for this. No,
48:45
no, I will definitely make this video.
48:49
How to share link? You can share it on
48:53
my email address that I provided you.
49:11
So that's all guys that I wanted to show
49:14
in this video. So thanks very much for
49:16
watching this video and I will be seeing
49:19
you in the next live stream.
