Help - Search - Members - Calendar
Full Version: SWF 2 PHP
BleepingComputer.com > Internet & Networking > Web Site Development
   
dlngle
Hi,
I am in desperate need of a way to get infomation out of a swf file into php.
I have full access to the swf file and all I need is a bit of a how to on making them run 2gether.

I am running a forum using PunBB and am allowed to edit whatever script with in copyright laws.

NE Ideas

Goal: To get info from a RPG game I made with flash and post it on my site. I also want the users of the forum to view the info from the game in there profile page, and perhaps even edit it. Umm I'm not realy learned in "PHP" So if its not 2 much trouble could the script/answer/wateva be spelt out in simple terms blink.gif

thanks so much if you can help
thanks so much if you cant wink.gif
Grinler
I do not know much about SWF files. Can you make it open a certain url when you want it to?
dlngle
Yes i can and i can make it open any url I need.
Grinler
What you are looking for may be a big project. Basically you want to attach the info to a url and use php or other web programming script to take that info and put it in a database. Then you can read the info from that database on a page in your site.

For example lets say at intervals in the game you send the following url:

http://www.site.com/scores.php?user=grinler&score=1000000

The scores.php will take that info and add it to your database. Then you can select the top 10 scores. Now this is very basic, but it gives the general idea of how it would work. Unfortunately this could turn into a rather large project so you may want to learn php
dlngle
Yea i thought it might be. Could you give me a tip where I could learn what I would need to know? If not maybe some pointers on how to get started, I have been studying a few forum scripts to get some ideas and I'm sort of getting the general Idea of php. I found that it calls info from a number of other scripts and can make new webpages by the info in the database? But I still cant find how to pull and print variables its got me stuck, could you give me the main idea of them and how I could use them?
Grinler
An excellent book to read is:

PHP and Mysql web development by luke welling and laura thomson
dlngle
kool ill giv it a look
visitus
Also check out the PHP.NET website for the latest functions in PHP.

I have got info out of image files when I have uploaded them with a web form file field. In php the information goes in to the $HTTP_POST_FILES variable, you can use that to extract information about the file.

There are also some functions for getting image sizes that may work with flash, it depends on the info you want to extract, e.g for image size use:

getimagesize("image_path") check php.net for more

hope this helps,

Graham

ps. the PHP and Mysql web development book is great, used it to build my website building site.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.