hi everybody.
1) thanks to Noinx for this great tutorial.
2) i’m also trying to get this stuff working but still get some errors when using the controller.
i’m using CI 1.6.2 with AMFPHP 1.9beta.
i set everything as Noinx described before.
i’ve two methods in my action-service:
function execute($path, $vars=false)
{
define('AMFPHP', 1);
global $value;
if($vars AND is_array($vars))
{
// Convert vars to POST data
$_POST = $vars;
}
$_SERVER['PATH_INFO'] = '/'.$path;
$_SERVER['QUERY_STRING'] = '/'.$path;
$_SERVER['REQUEST_URI'] = '/'.$path;
require_once('../../codeigniter/index.php');
return $value;
}
function hello($name)
{
return "hello " . $name;
}
the controller looks like the one in the example:
if (!defined('AMFPHP')) exit('No direct script access allowed');
class HelloWorld extends Controller {
function HelloWorld()
{
parent::Controller();
}
function index()
{
global $value;
$test = "result result result.";
$value = $test;
}
}
the first one is trying to use a ci-controller but throws an error saying:
“DEBUG: amf::RemoteService - onNetStatus() NetConnection.Call.BadVersion”.
i’m also using CHARLES proxy to view what’s going on between flash and amf-getaway and it says:
“Failed to parse data (...) unsupported AMF version or corrupted data: 8205”
if i check the RAW-response in CHARLES it just looks like any other amf response only i think there is an extra newline before the result - is this what’s causing all the trouble?
when i call the second method (“hello”) - i get the correct result “hello XXX”. so gateway etc are set up correctly.
maybe someone can shed some light ....?
thanks.
phil