![]() |
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
To access the contents, click the chapter and section titles.
Perl CGl Programming: No experience required.
which specifies the font to be used (Palatino-Italic) and the size in points (36). Its important that you set up boundaries large enough to hold your font in the size youve chosen, otherwise the characters or graphics will run off the edge of the box.
The next two lines of PostScript code define the colors to be used in the graphic: /white {1 1 1 setrgbcolor} def /black {0 0 0 setrgbcolor} def These are RGB definitions, which means the first number in the three-digit sequence stands for red, the second for green, and the third for blue. Turning all of them on gives white; the reverse gives black. The statement black clippath fill fills the entire drawing regionthe bounding boxwith black; 10 10 moveto starts the image 10 pixels up and 10 to the right, which will center our image nicely. Finally, we tell Ghostscript to draw the value in $count in white with ($count) white show. Every PostScript program must end with showpage if you want anything to be displayed. This program creates an image file in JPEG format that can then be called up in the Web page to display the access count. Every time its run, Ghostscript simply overwrites the existing counter.jpg file, ensuring that an updated count is stored there graphically every time. Its simple.
Moving On Youve learned about some non-CGI methods of creating dynamic Web pages through the server-side includes. Youve also learned how to generate graphical images on the fly with Ghostscript and Perl. In the next skill, well cover some methods of monitoring activity on your Web site, using Perl scripts to parse the information in your log files and generate graphical reports that can be viewed with a Web browser. Are You Experienced?Now you can
|
![]() |
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. |