The following example draws the sin and cos curves.
Note: you must have a pngs directory at the document root level.
Warning: imagepng(./pngs/graph.png): failed to open stream: Permission denied in /www/htdocs/v106064/jens/grafik.php on line 44