Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

NETTUTS.com:
Image Resizing Made Easy with PHP
Mar 19, 2010 @ 13:47:48

New from NETTUTS.com there's a recent tutorial showing you how to use the GD graphics library (bundled with PHP) to resize images on the fly.

Ever wanted an all purpose, easy to use method of resizing your images in PHP? Well that’s what PHP classes are for – reusable pieces of functionality that we call to do the dirty work behind the scenes. We’re going to learn how to create our own class that will be well constructed, as well as expandable. Resizing should be easy.

The simple eleven-step process (don't worry, it sounds worse than it is) has you go from a basic image and, with the help of a custom PHP class, create a resized image based on a type such as "landscape", "auto" or "exact". Full code is included for you to cut and paste or you can download the source and have the full code ready and waiting.

tagged: image resize tutorial gd graphic library

Link:

Zend Developer Zone:
Creating Scalable Vector Graphs with PHP
Mar 09, 2010 @ 16:27:54

A new tutorial has been posted to the Zend Developer Zone today looking at making scalable vector graphics with PHP and the hep of one of two charting packages - ezcGraph or SVGGraph (examples are provided for both).

Programmatically generating graphs and charts using SVG requires a deep understanding of the SVG specification and the various SVG primitives, as well as a fair amount of time for research, experimentation and debugging. Or, in other words, that's your entire weekend shot! Fortunately, help is at hand. There are a number of open-source PHP libraries that support SVG chart generation, and using them can significantly reduce the amount of work involved in adding this feature to a Web application.

He shows how to create simple images like bar, line and pie charts as well as adding in other things like a legend, custom titles and a sample where the user can define the sizes of a pie chart via some form input fields. Screenshots are included for all code examples to give you a better idea of the end result.

tagged: scalable vector graphic ezcgraph svggraph tutorial svg

Link:

Michael Maclean's Blog:
Handling fonts in PECL/Cairo
Mar 02, 2010 @ 18:42:43

Michael Maclean has a look at working with fonts in Cairo (a graphics manipulation extension in the PECL repository). The example will be added to the PHP manual too in case you need it for reference later.

Currently, in PECL/Cairo the only way to draw text is the referred to as the "toy" text API, which is a very basic way of handling text compared to the facilities available in the Cairo library itself. However, it's sufficient for most purposes that I've come across so far.

With the first versions of the Cairo extension, you had to use the selectFontFace method to choose the font you wanted. With the introduction of Cairo 0.2.0, you can now use FreeType font support instead and can use the streams API built into PHP to locate the resource. A snippet of code is included to show how that would work.

tagged: cairo graphic manipulation extension font freetype

Link:

CSS-Tricks.com:
Using Weather Data to Change Your Website’s Appearance through PHP and CSS
Feb 18, 2009 @ 18:08:03

On the CSS-Tricks.com site today there's a quick tutorial on changing up the look and feel of your site based on an external source. More specifically, they give the example of updating the graphics of your site depending on the weather in your area via PHP and CSS.

Using a little magic and trickery (read: PHP and CSS), we can change the appearance of a website automatically based on the weather outside, in real time! In the example site we have created, the header graphic will change to one of four different styles based on Sunny, Rain, Snow, and Cloudy.

Their example makes a request to the Yahoo! weather data for a location and brings it in to PHP where the XML is parsed (via a regular expression) and the current conditions are parsed out. This condition is then passed out into the page as the class type on the header and, based on the CSS already defined, the correct image is pulled in as the background.

tagged: weather data yahoo change header css graphic external source

Link:

Sebastian Bergmann's Blog:
The Cost of Test Isolation (and other PHPUnit Features)
Nov 27, 2008 @ 19:04:30

Sebastian Bergmann as a new post talking about a few of the features of the PHPUnit unit testing framework, especially test isolation.

Some of PHPUnit features come with the cost of a performance penality. This posting explores the effect of the --no-syntax-check, $backupGlobals = FALSE;, and --coverage-html options.

He compares benchmarks for a test with few different settings - $GLOBALS, syntax check and code coverage (including graphical output of the execution times on the various parts of the tests).

tagged: test isolation phpunit feature setting output graphic

Link:

Job Posting:
Kodak Graphic Communications Group Seeks PHP Application Developer (Stamford, CT)
Oct 17, 2008 @ 21:29:31

Company Kodak Graphic Communications Group
Location Stamford, CT
Title PHP Application Developer
Summary

Kodak has opened a Stamford CT office, through the friendly acquisition of our partner Design2Launch. Together we've developed an industry leading software solution that provides customers a collaborative workflow management system to take marketing projects from creation to finished product seamlessly.

Our Design2Launch solution is available as an enterprise system or a hosted solution, and highly customizable with its modular architecture. Here's some links to our product site:
http://graphics.kodak.com/US/Product/Enterprise_Marketing/default.htm
http://www.design2launch.com/about.htm

We're looking for (5) PHP Application Developers, who are passionate about technology and building solid products to join our dynamic team. Strong PHP, SQL, JAVA, HTML, DHTML, JavaScript, CSS, AJAX, and SOAP skills; Understanding of object oriented concepts, design patterns, and various open-source toolkits and frameworks would make you a strong candidate. Front and back end development experience required.

An interest and desire to further develop your technology skills in .NET, J2EE, ORACLE, Spring, EJB, jUnit and Hibernate is also key.

Most importantly - you have a talent for creating quality and reliable web & client/server systems. And enjoy tackling new challenge both independently and as part of a team.

This is an opportunity to join a high-growth team, working on a range of exciting technologies, creating an exceptional product that answers a key business need.

If you're interested in hearing more - please reach me by email ( tony.lee@kodak.com ) - or by phone (604-419-4718). Thanks for your consideration.

tagged: job post kodak graphic communications group stamford ct

Link:

Elizabeth Smith's Blog:
New Cairo Symbols in 1.8 and 1.6
Oct 14, 2008 @ 14:32:10

Elizabeth Smith has worked up a post with a full listing of the new symbols in the Cairo extension (a 2D graphics library for PHP).

Originally we were only going to support the latest (1.6), but then the new 1.8 version was released and I started adding support to that as well. Then we noticed that dreadfully slow/out of date RHEL and derivatives still have 1.4 versions of Cairo floating around (yuck). So the extension will support 1.4+ However the cairo docs are incorrect in a couple of places regarding new symbols. After some header diffing here is a complete list for 1.8 and 1.6 (to make life easier for anyone else writing language wrappers).

Her list includes forty new symbols for the 1.8 release of the extension and twenty-two for version 1.6.

tagged: cairo graphic library 2d extension pecl

Link:

PHPImpact Blog:
Where is the include coming from?
Aug 04, 2008 @ 16:13:55

Federico Cargnelutti has posted an interesting overview that graphically shows outlines for a few major PHP projects showing where the includes are coming from.

The includes of the system map out the dependencies of the system, which files depend on which, which subsystem depends on which. When working with a system, it's always useful to map out the dependencies before hand.

The software he's created the images for include WordPress, phpBB, and a few frameworks - Symfony, Zend Framework and CakePHP. He used the Inclued and Graphviz software to make the charts.

tagged: include graphic inclued graphviz software

Link:

IBM developerWorks:
Getting Graphic with PHP
Jul 03, 2008 @ 15:20:00

The IBM developerWorks site has a new tutorial posted (registration/login required) talking about image creating in PHP using the GD library.

The purpose of this tutorial is to show you how to get started with the GD library and to provide a variety of techniques you can apply to your Web-page coding. The tutorial doesn't cover every GD function, but it teaches you the basics. The Resources section provides Web sites where you can learn more about using the GD library.

They go through the creation of sample images, working with gradients and lines, adding text, saving the image data out to a file and how to work with existing graphics to modify them.

tagged: tutorial graphic gd image gradient text modify lines

Link:

DevX.com:
Add the Graphics Power of SVG to PHP
Feb 26, 2008 @ 16:44:00

In this DevX tutorial, Octavia Anghel shows how use PHP to create images based on the SVG libraries available to any browser.

Scalable Vector Graphics (SVG) is an XML specification for producing vector-based graphic content that you can create, modify, and manipulate dynamically from programming languages. Here, you'll explore the most important techniques and libraries for integrating SVG with PHP to create diverse graphic content—from simple shapes to complex graphs.

They show a few different ways to get the job done including a straight 'echo' call with the output, sending a converted SVG document over with a PHP header or including another (or multiple) SVG documents into another and outputting them. They also talk about tools like the phpHtmlLib library, the PEAR::XML_SVG package and the PEAR::Image_Canvas package.

tagged: svg graphic tutorial echo output include dynamic

Link:


Trending Topics: