One way you can do it is you have a browser such as mozilla installed on the server, and you also have X running (and a window manager), you can get a screenshot this way:
Leave the browser window open, fully maximized, in your server's X session. Run the command (from your script):
mozilla -remote openURL('http://www.mysite.com')
This should open the URL up in the servers X session. Once that is done, take a screen shot with any of the available tools for X. We'll use xwd as an example:
xwd -frame -root -out myscreenshot.xwd
This will take a full screenshot of the X root window, which should have the browser window open at that URL.
After that, you may have to use ImageMagick or NetPBM to convert the file into something usable for the web.
Hope this helps, even if it just points you in the right direction.