How can i tell if a website is HTML or PHP?

Status
Not open for further replies.

Hubert115

Regular Member
Joined
Jan 26, 2012
Messages
487
Reaction score
16
Can someone tell me how I can figure out if a website is coded in HTML or PHP?
 
Well look in the address bar. Does it say index.html or index.php? If it just says the URL, add index.html to the end of the URL and if you do not get a 504 it is HTML, otherwise it is php.
 
So this site is PHP? Because i did blackhatworld.com/index.html and it gave a 404 error
 
And some of them it just gives me an error not a 504 or 404 error... like fileice.net/index.html just says this page doesnt exist...
 
do a whois lookup to find out what kinds of servers it's running

do a google search with the url + php in google
 
So this site is PHP? Because i did blackhatworld.com/index.html and it gave a 404 error

Yes. Here's my somewhat lame explanation (I'm unqualifed, thus might bodge this):

HTML = static content. (Think: simplicity)
PHP = scripting language. That can produce HTML as an output due depending on certain factors.
 
Last edited:
U can't now. Honestly. If is simple without some special functions it is html and if is not, it's php. You can do all kind off staff with htaccess and extensions.
 
Actually, you can use php to create a page in html on the fly.

Php is executed on the server side, you will never see it.
Html is executed client side, that part you see but there is no way of knowing how it was created.
JavaScript is executed client side as well.
Anything executed on the client side, can be seen, tracked and recorded by you.

But just to be clear, I can write a page in html and just put in the php script code where needed without you ever seeing it. As long as the server has php installed, it will work. :)
 
damnit... I really needed a way to do this.
 
There's no guaranteed way. You can make .html pages with php. The first thing to look at is it .html or .php. If its .html is the content possibly non-static enough to require php? Second is to look at the page headers; see if there is an x-powered-by with PHP there. Not all servers support/send that header though so it can't be relied on. Third is to check the footprint to see if its a specific app.
 
I was just thinking on it a bit more and if the site has a login it uses php unless the owner needs some serious slapping. That might be another way of telling.
You can have a login without cookies, but without php to check any login request you might as well not have it at all.
 
ANY site is HTML (or XHTML which is a variant)
PHP is a server side programming language, so it does some stuff and eventually outputs HTML. Same with any other programming language that is used to generate a web page.

There are many, many ways to figure out if a site is static HTML or uses a programming language, and which language and writing an exhaustive list of methods would take a long time. However think of it like this - if it has a form anywhere it needs a programming language to handle the submit.

Easiest way, which may not always work is to enter index.php after the domain - e.g. http://x.com/index.php if it loads then it uses PHP. But keep in mind that just because a site uses PHP doesn't mean it uses just PHP or that it uses it on every page.
 
The html(variant) can be generated by pretty much any programming language or scripting language. including php asp .net and many languages you wouldn't expect. How it is created is as relevant as whether they are using a flatfile to store data or a database(and what kind of database).

I guess for anyone to help you out we need to know 'why' you need to know what the site is running on.
 
Do NOT go by the file extension. .html and .htm cam both be php generated pages. All you have to do is set the htaccess to parse html and htm files for php code.

Many sites that I have built, started out using static html and later php elements where added. So it was much easier to just tell the server to parse the html files for php.

Also html pages can look like they have php created elements. But, those elements could be server side includes (SSI) and not php.
 
As said above, using mod rewrites in htaccess can disguise a php site as anything else BUT php. First thing I would try is to view source and see what kinds of extensions are on nav links. are they html, asp, php, etc? If that doesn't lead you anywhere, try looking at comments in the code or in the stylesheets (css) or javascript (js) files for clues. Most sites out there are built using a cms like wordpress or drupal or something like that. If this is the case, chances are there is something left in the comments somewhere in the code of what kind of software being used and you can google it to find it.

For example, just looking at the html tag of this site shows a popular forum software name called vbulletin. The vbulletin wiki says it uses php and mysql. Not to say that this is definitely the language and db uses, but it's pretty likely. You just gotta look for clues that the developer may have left behind.

But I guess the real question is...why do you want to know?
 
Looking at the source is a way to determine this but you can not really be sure if the website is using PHP or pure HTML.
HTML is the compiled code of the scripting language of PHP, .NET or others.
For instance if I want to troll someone I can simply make the compiled HTML as the source code of a Wordpress website even if I do not use PHP. :)
 
What are the file extensions of your web page? .html or .php? That will tell you. :)
 
What are the file extensions of your web page? .html or .php? That will tell you. :)

That will not tell you!

PHP is serverside, usually when used to generate a web page it will output HTML etc...

If you wanted you could display .bhw as your file extension.
 
Status
Not open for further replies.
Back
Top