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

NetTuts.com:
The 11 Phases of a Web Developer’s Career (As Illustrated by Memes)
Mar 25, 2013 @ 09:45:32

NetTuts.com has started off the week on a humorous note with this latest post showing the "11 Phases of a Web Developer's Career" as illustrated with animated GIFs of various internet memes.

The career of a web developer is an interesting one with many slopes. Considering a learning curve this steep, you can fully expect to live through periods of frustration, enlightenment, self-righteousness, and every mindset in between. In this article, we’ll have some fun, by reviewing each of these phases through the lens of a meme!

Some of the phases include:

  • Phase 1 - Noob
  • Phase 3 – Complete Frustration
  • Phase 5 – Fragile Code
  • Phase 7 – Cocky
  • Phase 9 – When Code Becomes Art
  • Phase 10 – Seasoned

Check out the post for the images of these and the others on their "top 11" list.

tagged: webdeveloper career stages animated gif meme humor

Link:

Sameer Borate's Blog:
Unpacking binary data in PHP
Sep 22, 2010 @ 10:45:52

Sameer Borate has a new post to his blog today talking about a method for unpacking binary data directly in PHP - specifically in working with images.

To set the stage we will start with a programming problem, this will keep the discussion anchored to a relevant context. The problem is this : We want to write a function that takes a image file as an argument and tells us whether the file is a GIF image; irrelevant with whatever the extension the file may have. We are not to use any GD library functions.

He shows how to use the unpack function to open up the file and pull out the raw data - including the header information that tells you what kind of file it is you're working with. There's also an example of unpacking the header contents and grabbing things like height, width and the aspect of the image.

tagged: unpack binary data tutorial gif image

Link:

Lorenzo Alberton's Blog:
Create a video preview as animated GIF with FFmpeg and PHP SPL
Sep 04, 2009 @ 09:52:50

Lorenzo Alberton has posted a new item to his blog with a code snippet showing the combination of FFmpeg and features in PHP's SPL to make a GIF preview.

About one year ago, I had to create animated GIFs as a preview of a video for a media portal. I recently stumbled upon the code I wrote and thought it was probably worth sharing. It makes a rather unconventional use of the SPL Iterators, proving how flexible they are.

His method combines Imagick, FFmpeg and a a Thumbnail_Extractor class that extends the SPL Iterator. The script runs through the frames of the movie file and allows you to define multiple places to pull thumbnails from. Complete code and output examples are included.

tagged: animated gif tutorial ffmpeg movie thumbnail spl

Link:

Mikko Koppanen:
Requested examples: Animating GIF Images
Oct 10, 2007 @ 09:32:00

At the request of another developer, Mikko Koppanen has written up a post for his blog today showing how to create animated GIFs in PHP with Imagick.

Today's example was requested by a user called Devo. This example illustrates making an animated GIF image by creating the frames from scratch. It's been so long since I've really drawn anything so I decided to use text as the base for this animation.

His example ends up as a string ("Hello World") that's animated to show one more letter at a time as each frame loads.

tagged: imagick animated gif image text hellowworld imagick animated gif image text hellowworld

Link:

Mikko Koppanen:
Requested examples: Animating GIF Images
Oct 10, 2007 @ 09:32:00

At the request of another developer, Mikko Koppanen has written up a post for his blog today showing how to create animated GIFs in PHP with Imagick.

Today's example was requested by a user called Devo. This example illustrates making an animated GIF image by creating the frames from scratch. It's been so long since I've really drawn anything so I decided to use text as the base for this animation.

His example ends up as a string ("Hello World") that's animated to show one more letter at a time as each frame loads.

tagged: imagick animated gif image text hellowworld imagick animated gif image text hellowworld

Link:

DevShed:
Creating Image Streams from Existing Graphics with the GD Library in PHP
Aug 20, 2007 @ 11:04:00

DevShed continues its look at using the GD graphics library in PHP with the second part of the tutorial series, this time focusing on the creation of images from existing images (and their streams).

As I stated at the end of the previous article of this series, the GD extension comes packaged with many other useful functions, which indeed deserve a close and detailed look. Thus, in this second tutorial I'll show you how to create different types of image streams from existing graphics, but in this case limiting the process to building GIF, JPG and PNG images.

They work through each of the types (GIF, JPG and PNG) creating an new one from a previous "clouds" image of the same type (a GIF out of a GIF, a JPG from a JPG, etc).

tagged: tutorial gd graphic create stream png jpg gif existing tutorial gd graphic create stream png jpg gif existing

Link:

DevShed:
Creating Image Streams from Existing Graphics with the GD Library in PHP
Aug 20, 2007 @ 11:04:00

DevShed continues its look at using the GD graphics library in PHP with the second part of the tutorial series, this time focusing on the creation of images from existing images (and their streams).

As I stated at the end of the previous article of this series, the GD extension comes packaged with many other useful functions, which indeed deserve a close and detailed look. Thus, in this second tutorial I'll show you how to create different types of image streams from existing graphics, but in this case limiting the process to building GIF, JPG and PNG images.

They work through each of the types (GIF, JPG and PNG) creating an new one from a previous "clouds" image of the same type (a GIF out of a GIF, a JPG from a JPG, etc).

tagged: tutorial gd graphic create stream png jpg gif existing tutorial gd graphic create stream png jpg gif existing

Link:

Builder.com.au:
PHP exploit code plants itself in GIF
Jun 22, 2007 @ 12:41:00

Builder.com.au has a new article today about the recent image issue - the PHP code embedded inside the GIF - that's come up on several sites.

The exploit code slipped through the site's defenses with the aid of a legitimate image at the beginning of the file, according to a blog post on the Sans Institutes's Internet Storm Center. [...] Malicious attackers planted PHP coded exploit script within an image file. PHP is often used as a programming language to create dynamic Web sites.

The article reports that, while this exploit hasn't happened much, the occurrences of it's use are growing with victims in a wide range of classifications - from small personal sites out to a certain major image hosting site. This same issue was discussed here on the PHPClasses.org website as well.

tagged: gif exploit image script embed gif exploit image script embed

Link:

Builder.com.au:
PHP exploit code plants itself in GIF
Jun 22, 2007 @ 12:41:00

Builder.com.au has a new article today about the recent image issue - the PHP code embedded inside the GIF - that's come up on several sites.

The exploit code slipped through the site's defenses with the aid of a legitimate image at the beginning of the file, according to a blog post on the Sans Institutes's Internet Storm Center. [...] Malicious attackers planted PHP coded exploit script within an image file. PHP is often used as a programming language to create dynamic Web sites.

The article reports that, while this exploit hasn't happened much, the occurrences of it's use are growing with victims in a wide range of classifications - from small personal sites out to a certain major image hosting site. This same issue was discussed here on the PHPClasses.org website as well.

tagged: gif exploit image script embed gif exploit image script embed

Link:

PHPClasses.org:
PHP security exploit with GIF images
Jun 20, 2007 @ 12:57:00

On the PHPClasses site today, there's a new post that points out an issue that could happen with dyanamic GIF creation in a PHP script leading to a security exploit.

Manuel Lemos writes:

The problem that was discovered is that you can insert PHP code in the middle of a GIF image. That would not be a problem if it was not for the insecure ways some developers use to serve images upload by their users. Usually, uploaded files are moved to a given directory. If the site then serves the images directly from that directory and preserve the original file name, the site may be open for security exploits.

The problem comes when a user decides to upload an "image" file that's actually a PHP script (ending in PHP even) to the remote system. When this is outputted, it's placed inside the image tag and executed with each page load. Manuel offers a suggestion to prevent the issue - protecting the images directory and using readfile to grab the contents of the file to output rather than just a straight echo.

tagged: security exploit image gif dynamic readfile output security exploit image gif dynamic readfile output

Link: