Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: AMFPHP.

Development:AMFPHP

From MoodleDocs
Revision as of 08:46, 4 October 2007 by Jamie Pratt (talk | contribs) (started a new page on using amfphp with Moodle)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

What is AMFPHP

AMFPHP is a widely used OS remoting server that allows your Flash movies to send and receive data to and from your web server and interact with your PHP scripts. Data to/from PHP is automatically converted into the appropriate Flash variable type and communication is fast because the format data is sent in is compact and is handled efficiently by the Flash player (large XML files can sometimes take time to be processed).

Using AMFPHP with Moodle

  • I downloaded AMFPHP 1.2.6 and installed it in my moodle site under MOODLEROOT/lib/amfphp/ So that gateway.php is at MOODLEROOT/lib/amfphp/gateway.php
  • In gateway.php I :
    • added include_once "../../config.php"; to the beginning of the file.
    • I edited the call to $gateway->setBaseClassPath so it reads $gateway->setBaseClassPath($CFG->libdir."/amfphp/services/");

Installing Flash Remoting Components in Your Flash Editor

You must download an extension to the Flash editor here. This installs the necessary code libraries for Flash to communicate with a Flash remoting server. More info can be found on the amfphp site here.