I know I sound very stupid for writing this post. I have read probably 100 documents by this time. I am working on an assignment in my class for which I need to to poll a SNMP based device and show the input output traffic statistics in form a GIF image. I have never worked on PHP before. Although the portion of the script which collects the statistics from SNMP device is working correctly, the other part which deals with image creation doesnt work. So I tried to write a very basic program to create a GIF image. <html> <head> <title> PHP TEST </title> </head> <body> <?php header("Content-type: image/gif"); $im = imagecreate(600,115); $backgroundColor = imagecolorallocate($im,204,204,153); imagefill($im,0,0,$backgroundColor); imagegif($im); ?> </body> </html> The problem is that it gives me warning :- ""Warning: Cannot modify header information - headers already sent by (output started at /home/compsci/jsharma/public_html/program3.php:6) in /home/compsci/jsharma/public_html/program3.php on line 8" I know this problem is created because of white space character. But despite my sincere efforts I have not been able to locate any white spaces before or after <?php and ?> tags. Also instead of a GIF image I see some junk characters in the browser. If i remove line containing header(); then the warning goes off but I still see junk characters in the browser and no image. Please tell me if I am missing on something. Thanks in advance Jayesh