Generate SWF with PHP from a form?

Hi...  ;)

I remember doing a SWF creation with MING/PHP long time ago...  But it wasn't really a pleasant experience if I recall...

Let's say I have a form that says 'Enter your paragraph:' and there is a text area down below and a Convert button next to it...  The idea is that you enter your own text into the HTML text area and have it create a SWF with that text...  If the text is larger than the height of the specified SWF, it'll need to throw in a scroller...

I did some googling and found one called Sphing...
   http://sphing.sourceforge.net/
I also know that there is a commercial product called PHP Turbine, but that's not something I can afford cuz I am not making any dime with this...
   http://www.blue-pacific.com/products/phpturbine/default.htm

Any thoughts???  Thanks...  ;)

CyanBlue
LVL 37
CyanBlueAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

blue-genieCommented:
hey CB

have a nosey here -
http://freemovie.sourceforge.net/
0
IqAndreasCommented:
Even if it may be possible, it may be a little hard on your server if it is highly populated and used a lot (but for a couple requests a day it won't make any difference at all)

Still, could you elaborate a little more on what you are trying to do, and there may be another way around it, such as passing in the text you want to display in the "child SWF" as FlashVars or something.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

CyanBlueAuthor Commented:
Hey, guys...  ;)

@blue-geni...  Freemovie is interesting one, but it only supports shapes...  It does not support the creation of a textField which makes sense since it's from 2001...  I don't know how come I wasn't aware of it though...

@IqAndreas...  I am basically trying to create something that generates a SWF on the fly...  Well, I am trying to create a SWF to replace the HTML text area so that it is harder to steal what's wrote in it to be exact...  
On another community that I participate in is something that goes with amateur novel where somebody started to steal the content of it and post it somewhere else as if that's their own creation... and I am trying to make it harder to steal by moving the content into the SWF...  
Since that community is a free site, it does not support anything like PHP, database or even JavaScript...  So, I was thinking maybe I could spare some space on my server and have have the authors use the tool to create the SWF, some automatic tool posts the SWF to another free online space and spit out the embed tag which the authors can use to post in the community...
So, anything external is not really an option since you can simply view source or sniff the traffic to steal the content...

Well, to recap, I want to create something that's standalone as is so that it is easy to embed and hard to steal...

Any thoughts???

CyanBlue
0
blue-genieCommented:
CB - i've come to the conclusion you don't sleep. :-)

i haven't seen any other free / opensource options.
I've read some comments about freemovie being better than sphing but since i've used neither I have no idea.

we have done it before using C# which is not an option if this is web based yea?

just a side thought, not understanding your use case. does it contain a textfield that people type into and people are copy / pasting content.
0
IqAndreasCommented:
Actually, it is possible to extract text from SWFs, (as you may have noticed, Google is now including searches in text inside of SWFs in some of their results) however the average user shouldn't really be able to do this.


Another alternative (which is a lot easier in PHP) is converting the text to an image. Then you could also add things like background etc and a "watermark". "Stealers" would need to manually copy down the text in order to steal it.

However, an image would take longer to load and be a little bit more annoying to read than a SWF, so compiling it might actually be your best alternative. I asked a long time ago on the Kirupa forums how this could be done, and I got a few suggestions, but I cannot find the thread. :(

If you store an ActionScript compiler on the server, I'm sure there is some way to have your PHP code run the executable and return the generated SWF.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CyanBlueAuthor Commented:
Hey, I do sleep...  While I commute in metro, I mean...  Of course, I miss my stop quite frequently...  :p

Sphing is not an option either since it currently only supports JPG to SWF conversion...  It seems like Ming is the only one robust enough to do anything that goes with what I am trying to do...  I remember there was at least one more that sounds something like pickle or some flavour of vegetable, but I don't really recall what it is...  I came across with it when I was researching something on FlashLite...  :(

What did you do with the C# that goes with the creating SWF???  Does it only work as a standalone or can it work online???  My C# is somewhat rusty, but if it is something that can be done, I am up for it as well...

To simplify my requirement...  I am trying to create a SWF out of basically what I type in this Comment box of this topic...  I type something and I click Submit button which will generate the SWF version of what I just typed...

Thanks, guys...

CyanBlue
0
CyanBlueAuthor Commented:
@IqAndreas...

Yes, you sure can extract the text from the SWF...  I just want it abit harder to grab it...  That's all...  The site that I am participating is a member based one which does not allow google to search through...

I also thought about converting the text to image, and investigating further on it...  I am abit hesitant on this for the same reason where it makes things whole lot larger in terms of the file size and so on...  At any rate, it'd be great if you know of any resource on converting text to JPEG...  

---
If you store an ActionScript compiler on the server, I'm sure there is some way to have your PHP code run the executable and return the generated SWF.
---
What do you mean???

I am really attempted to create a PHP/MySQL based system on my server where a user types their novel, I store it on my server...  I create a SWF where I pass the content in a reasonably secure manner so that in won't be easy to sniff over the network monitor...  The downside of it is that the community is quite huge and I probably will end up with big bill if I do that...  :(

Thanks, guys...

CyanBlue
0
blue-genieCommented:

http://sourceforge.net/projects/swfdotnet/

The SwfDotNet framework is a full .Net open source library for writing, reading and generating Flash(tm) Swf files on-the-fly with C# .Net or VB.Net. It's composed of packages for IO writing/reading process. Written by Olivier Carpentier.

 now that i think of it what we didn't wasn't what you're trying to do.
we had a desktop app (flash in c#) where the user did a bunch of stuff, hit save - generates a xml doc.

another blank swf exists only to load that xml doc. based on "instructions" in that xml doc it generates some stuff including loading pics etc.

0
CyanBlueAuthor Commented:
Gotcha...  I sure will take a look at it if I fail in PHP world...  Like I was saying my C# is somewhat rusty...  But then, I haven't play much PHP either, recently that is...  Stuck in the ASWorld...  :(

CyanBlue
0
CyanBlueAuthor Commented:
Not sure if it is an easy thing to implement, but I think I've got what I needed...  Thanks, guys...  ;)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.