Go Back   HostGator Peer Support Forums > Public Forums > Suggestions

Notices

Reply
 
Thread Tools
  #1  
Old 09-05-2006, 12:17 PM
cjnoyes cjnoyes is offline
Swamp Croc
 
Join Date: Jan 2006
Posts: 250
Default Enable Ming/SWF support in PHP

There is some neat functionality in php to be able to generate flash files (.swf), there are two groups of that functionality. It would be helpful if these could be included the next time you rebuild php

this is from the php.net site documentation

the older one ...
PHP offers the ability to create Shockwave Flash files via Paul Haeberli's libswf module.
Note: SWF support was added in PHP 4 RC2.
The libswf does not have support for Windows. The development of that library has been stopped, and the source is not available to port it to another systems.
For up to date SWF support take a look at the MING functions.
You need the libswf library to compile PHP with support for this extension. You can download libswf at ftp://ftp.sgi.com/sgi/graphics/grafica/flash/.


Once you have libswf all you need to do is to configure --with-swf[=DIR] where DIR is a location containing the directories include and lib. The include directory has to contain the swf.h file and the lib directory has to contain the libswf.a file. If you unpack the libswf distribution the two files will be in one directory. Consequently you will have to copy the files to the proper location manually.

the newer one...
First of all: Ming is not an acronym. Ming is an open-source (LGPL) library which allows you to create SWF ("Flash") format movies. Ming supports almost all of Flash 4's features, including: shapes, gradients, bitmaps (pngs and jpegs), morphs ("shape tweens"), text, buttons, actions, sprites ("movie clips"), streaming mp3, and color transforms --the only thing that's missing is sound events.
Note that all values specifying length, distance, size, etc. are in "twips", twenty units per pixel. That's pretty much arbitrary, though, since the player scales the movie to whatever pixel size is specified in the embed/object tag, or the entire frame if not embedded.
Ming offers a number of advantages over the existing PHP/libswf module. You can use Ming anywhere you can compile the code, whereas libswf is closed-source and only available for a few platforms, Windows not one of them. Ming provides some insulation from the mundane details of the SWF file format, wrapping the movie elements in PHP objects. Also, Ming is still being maintained; if there's a feature that you want to see, just let us know ming@opaque.net.
Ming was added in PHP 4.0.5.

To use Ming with PHP, you first need to build and install the Ming library. Source code and installation instructions are available at the Ming home page: http://ming.sourceforge.net/ along with examples, a small tutorial, and the latest news.
Download the ming archive. Unpack the archive. Go in the Ming directory. make. make install.
This will build libming.so and install it into /usr/lib/, and copy ming.h into /usr/include/. Edit the PREFIX= line in the Makefile to change the installation directory.


Example 1. built into PHP (Unix)


mkdir <phpdir>/ext/ming
cp php_ext/* <phpdir>/ext/ming
cd <phpdir>
./buildconf
./configure --with-ming <other config options>



Build and install PHP as usual, restart web server if necessary.
Now either just add extension=php_ming.so to your php.ini file, or put dl('php_ming.so'); at the head of all of your Ming scripts.
Reply With Quote
  #2  
Old 09-06-2006, 04:49 AM
osirion's Avatar
osirion osirion is offline
Swamp Croc
 
Join Date: Dec 2004
Location: South Africa
Posts: 224
Thumbs up Re: Enable Ming/SWF support in PHP

Could be useful! I'm for it!
Reply With Quote
  #3  
Old 07-13-2008, 02:04 PM
vovaNux vovaNux is offline
Hatchling Croc
 
Join Date: Jul 2008
Posts: 1
Default Re: Enable Ming/SWF support in PHP

Here is a good guide: http://www.lampdocs.com/blog/2008/07...pport-for-php/
Reply With Quote
  #4  
Old 07-13-2008, 09:14 PM
Arctic Fire Arctic Fire is offline
Hatchling Croc
 
Join Date: Jul 2008
Location: /dev/null
Posts: 35
Default Re: Enable Ming/SWF support in PHP

I'd like to see this too. $vote++
__________________

Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 06:24 AM.