These are 2 examples of scripting languages - i.e. simple programming languages not compiled. They are both good at running at webservers, running serverside. I.e., if I ask what time it is, I'll get the answer from the webserver, not the client. And I can gain access to e.g. a database, that's also on the webserver.
Both languages are XHTML with embedded program pieces. The program produces more XHTML, and the browser only sees XHTML. In special cases the document doesn't contain/produce any XHTML, but e.g. makes a correction in a database, and then makes sure another page is shown.
Active Server Page was invented by Microsoft - typically this is VBScript (originates in Visual Basic), embedded in XHTML. There files have .asp as suffix.
PHP: Hypertext Preprocessor is primarily used on Linux servers, and is free. These files have .php as suffix.
Concept last updated: 06/05 2004.