Hi,

I'm using AMFPHP to perform all the database operations such as 
insert, update, delete, select, etc.

In the example I'm giving, I have a report that I need to show the 
user.  So I'm just directing them directly to the report page using 
the navigateToURL, but wanted a way to mask the variable being passed.

Doing this as a remoting call, I would have to create an iframe to 
show the report in, I just feel it is probably easier to take them in 
a new browser window directly to the resulting HTML that comes from 
the PHP script they are running.

Thanks for the help!
-David

--- In [email protected], "aphexyuri" <[EMAIL PROTECTED]> wrote:
>
> Hey David,
> AMFPHP right? If I'm not mistaken, navigateToUrl isn't the best way 
to
> go about it. AMFPHP is Remoting...so maybe use it as such? I'd go at
> it this way:
> 
> Step 1: Create your RemoteObject. Obviously this can be done in AS 
as
> well:
> <mx:RemoteObject id="amfphpService" showBusyCursor="true"
> destination="amfphp" fault="amfphpFaultHandler(event)"
> source="tamarispa.resServ">
>    <mx:method name="myAmfMethod"
> result="myAmfMethodResultHandler(event)"/>
> </mx:RemoteObject>
> 
> Step 2: Set your endpoint & do imports
> //point to gateway
> amfphpServ.endpoint = "http://www.myServer.com/amfphp/gateway.php";;
> 
> //do your imports
> import mx.rpc.events.ResultEvent;
> import mx.rpc.events.FaultEvent;
> 
> 
> Step 3: Make the call
> private function callAmfService():void {
>   var sendObj:Object = new Object();
>   sendObj.name = "me";
>   sendObj.greeting = "hello";
>   amfphpServ.getOperation("myAmfMethod").send(sendObj);
> }
> 
> Step 4: Handle the result / fault
> 
> You can basically send any info (like the sendObj in above example),
> and it's not goint through as URL vars.
> 
> If you want more security, you can serialize / deserialize your
> objects before you send'em.
> 
> good luck...
> 
> --- In [email protected], "David C. Moody" <davidm@> wrote:
> >
> > Hi guys,
> > 
> > Using Flex 3 & AMFPHP to do my database operations.
> > 
> > I have a report that you specify all the options in flex, and 
> > currently I'm just using a navigateToURL() function to open a web 
> > browser.
> > 
> > I do not like this it is very unsecure as the variables are all 
> > passed in the URL string.
> > 
> > How can I get around this?  I've thought about creating an 
> > intermediate database that houses all the variables and then have 
a 
> > random number generated and only pass that random number so that 
the 
> > PHP script can then pull that record from the database and get 
the 
> > variables it needs.
> > 
> > There's got to be an easier way to do this though?  How can I 
make 
> > this where the user can't change the variables and run a 
different 
> > report.  Is there a way to share variables between Flex & PHP 
without 
> > putting them in the URL?  Cookies maybe?
> > 
> > Thanks for any help!
> > -David
> >
>


Reply via email to