View Full Version : including PHP in .html pages

05-05-2004, 02:58 PM
OK, I've been trying to find out how you do this ever since I started coding, so what I want to find out is, there are services out there, for example tag-board, counters and stuff that you can sign up for and then you include this script in your page and where you placed this script is where the tag-board/counter etc will come up.

the script usually starts with
<script ...></script>

how do they do this when obviously people can include this in their NON php/asp etc pages and it will show up.

05-05-2004, 04:55 PM
<script src="http://www.domain.com/counter.php"></script>

makes the page load counter.php which is parsed as a PHP file , normally no output is expected expected/generated though your script can output valid javascript.

same goes for <img src="http://www.domain.com/counter.php" /> , again counter.php can do its stuff and output a 1px*1px image so as not to break anything.