[GLLUG] PHP GD Headers and Tables

Sean picasso@madflower.com
Fri, 31 Jan 2003 20:53:08 -0500 (EST)


Or did you mean something like this?

http://www.madflower.com/~picasso/submit.html

On Fri, 31 Jan 2003, Sean wrote:

> well here...
> http://www.madflower.com/~picasso/final.php
> 
> the source is: 
> root@phish public_html]# more final.php 
> <html><head><title>a GLLUGged  Example</title></head>
> <body>
> 
> <table border="0" cellspacing="0" cellpadding="0" height="48" 
> width="100%">
>  <tr bgcolor="#FFFFFF">
> <th>GLLUG RULZ</th>
> </tr>
> <tr bgcolor="#FFFFFF">
> <th> <IMG SRC="pngtest.php"></th>
> </tr>
> </table> 
> </body>
> </html>
> 
> 
> [root@phish public_html]# more pngtest.php 
> <?php
> $im = @imagecreate (200, 50)
>     or die ("Cannot Initialize new GD image stream");
> $background_color = imagecolorallocate ($im, 255, 255, 255);
> $text_color = imagecolorallocate ($im, 0, 0, 0);
> imagestring ($im, 10, 5, 5,  "The GLLUG RULZ!", $text_color);
> header ("Content-type: image/png");
> imagepng ($im);
> ?>
> 
> 
> On Fri, 31 Jan 2003, Sean wrote:
> 
> > Sure why not? 
> > 
> > you need to make sure you include the:
> > header("Content-Type: image/png");
> > when you create the image else the browser will get confused.
> > 
> > also make sure you destroy the image handle. 
> > 
> > I will see if i can chase down the stuff I wrote Im not sure I have it 
> > still or whether it is relevent to php4 or not. But the php.net 
> > documentation is rather good. 
> > 
> > 
> > 
> > On Fri, 31 Jan 2003, Ex Fed wrote:
> > 
> > > Does anybody out there know if I can send with PHP a dynamically created PNG 
> > > and html table text together in the same browser window? I had have problems 
> > > in the past with headers.  Anybody know a way around this?
> > > 
> > > 
> > > Could I have php create only the png on the server and seperately the Html 
> > > with <img src= file created on server>?
> > > 
> > > 
> > > Lee
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > _________________________________________________________________
> > > Tired of spam? Get advanced junk mail protection with MSN 8. 
> > > http://join.msn.com/?page=features/junkmail
> > > 
> > > _______________________________________________
> > > linux-user mailing list
> > > linux-user@egr.msu.edu
> > > http://www.egr.msu.edu/mailman/listinfo/linux-user
> > > 
> > 
> > _______________________________________________
> > linux-user mailing list
> > linux-user@egr.msu.edu
> > http://www.egr.msu.edu/mailman/listinfo/linux-user
> > 
> 
> _______________________________________________
> linux-user mailing list
> linux-user@egr.msu.edu
> http://www.egr.msu.edu/mailman/listinfo/linux-user
>