O'Reilly logo

Head First PHP & MySQL by Lynn Beighley, Michael Morrison

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. Visualizing your Data... and More!: Drawing dynamic graphics

image with no caption

Sure, we all know the power of a good query and a bunch of juicy results. But query results don’t always speak for themselves. Sometimes it’s helpful to cast data in a different light, a more visual light. PHP makes it possible to provide a graphical representation of database data: pie charts, bar charts, Venn diagrams, Rorschach art, you name it. Anything to help users get a grip on the data flowing through your application is game. But not all worthwhile graphics in PHP applications originate in your database. For example, did you know it’s possible to thwart form-filling spam bots with dynamically generated images?

Guitar Wars Reloaded: Rise of the Machines

The future is now. Robots have already been let loose in the virtual world and there isn’t much to stop them other than some PHP coding vigilance. The robots are spam bots, which troll the Web for input forms that allow them to inject advertisements. These robots are chillingly efficient and care nothing about the intended usage of the forms they attack. Their one and only goal is to overrun your content with theirs in a bloodthirsty conquest of ad revenue for their masters. Sadly, the Guitar Wars high score application has fallen prey to the bots.

All web forms are at risk of attack from spam bots.

Spam bots excel at mindless repetition, in this case filling ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required