graphics / graphical text with PHP
graphics / graphical text with PHP
Author
Discussion

xsaravtr

Original Poster:

801 posts

288 months

Wednesday 10th March 2004
quotequote all
Can anyone point me in the right direction for some tutorials on this? Or do you have some sample scripts you are willing to share...

Thanks

TheExcession

11,669 posts

276 months

Wednesday 10th March 2004
quotequote all
Hi,
Not sure I quite understand your question here.

PHP as I know it is a script language run by a web server in order to generate HTML.

The browser renders the HTML and produces all the pretty text and graphics.

Unless you are already a programmer you need to get a solid understanding of HTML, then you can learn how to use php to generate HTML.

There are loads of HTML and PHP forums out there to go take a look at.


keep asking the questions
best
Ex

xsaravtr

Original Poster:

801 posts

288 months

Wednesday 10th March 2004
quotequote all
Thanks for the reply...

I have a good understanding of php for the techie stuff like connectiong to database etc. But I read somewhere that php can be used to generate bitmap graphics. I'm interested in being able to to dynamic text images based on content from the database... just dunno how to do it...

Will have a google for tutorials/code snippets... ta

bga

8,134 posts

277 months

Wednesday 10th March 2004
quotequote all
I think I saw a link to a tutorial on generating graphics via PHP on www.webmonkey.com
It was a while ago so can't be certain

Marshy

2,751 posts

310 months

Wednesday 10th March 2004
quotequote all
A quick search through www.php.net ought to sort you out.

A quick quore from my PHP pocket reference says "The graphics functions in PHP can be used to dynamically create a GIF image stream. This stream can either be sent directly to the browse or saved in a standard GIF file."

Start off searching for the function "imagecreate()" and go from there...

xsaravtr

Original Poster:

801 posts

288 months

Wednesday 10th March 2004
quotequote all
Marshy said:
A quick search through www.php.net ought to sort you out.

A quick quore from my PHP pocket reference says "The graphics functions in PHP can be used to dynamically create a GIF image stream. This stream can either be sent directly to the browse or saved in a standard GIF file."

Start off searching for the function "imagecreate()" and go from there...


Thats what I want... cheers chaps...

TheExcession

11,669 posts

276 months

Thursday 11th March 2004
quotequote all
Absoultely, sorry misunderstood your question there.

Don't forget you can also shell out OS commands from php so things like ImageMagick can also be used if you work in conjuction with php file read & write functions.

In php its a piece of piss to take an image pass it through ImageMajick, read the output file back in, then change the HTTP header to indicate what ever image type it has just generated jpeg/gif etc and then send it to the client.

best
Ex

Dontlift

9,396 posts

284 months

Thursday 11th March 2004
quotequote all
xsaravtr

Drop me a line with more details of what you are trying to do as I have a bank of scripts for this sort of stuff on the shelf (mostly from www.hotscripts.com)