See SSI in CGI scripts?. If you're not willing to try to figure out how to use a module (hint: try uploading it in the same directory as your script), prepare to do all the work yourself.
How did I find that so fast? Try typing SSI CGI in that search box up there at the top left and see what happens...