[thelist] FPDF+Jpgraphs

Brady Mitchell mydarb at gmail.com
Mon Oct 8 21:58:15 CDT 2007


jothi jothi wrote:
>   I have seent the tutorial where they use the 
>   $logo=get contence.....(http://localhost/graph.php)
>    
>   I had tried this but it is not working...
>    
>   Errors comes out saying that graph.php is not PNG.....

You need to set the content-type header.

header('Content-type: image/png');

Take a look at:
  - http://php.net/header
  - http://www.webmaster-toolkit.com/mime-types.shtml

>   Is anyone have used insert the Jpgraphs in FPDF?

I've never used jpgraphs and fpdf together, but once you set the mime 
type you should be able to use graph.php as an image.

Brady



More information about the thelist mailing list