PHP :: Adobe Flex - How To Handle Sessions

Nov 17, 2011

I am thinking about porting my social netowrking site code to Adobe Flex / PHP and was wondering how does one go about handling sessions in this case. I would imagine Adobe Flex doesn't really know if a PHP session has been started or not therefore, I would have to research how to accomplish this. One idea I had was to created a session token string after a successful login and pass this token to each http request the user makes for data. E.g. [URL]. Each time a request is made to this page, a MySQL query is run to check if the token I passed in the url matches against the token created for that user during login. If this is true, then data is returned.

View 1 Replies


Similar Posts:


Flex :: Limit Pyamf Flex Sessions Or Setting A Timeout?

Feb 22, 2010

How do I limit my amf sessions to flex over pyamf?

I have set up a pyamf gateway to that serves value objects that originate from a django admin panel, through sqlalchemy to my authenticated flex client. It's working great, however there is a problem. My sessions are persisting and clogging up the server, so after about 20 or so AMF sessions are authenticated, it refuses any more until I restart the server.

View 1 Replies

Flash :: Flex - Do Sessions With A Client

Jan 28, 2010

Since the Flash Player (or, more exactly, the URLLoader class) will not let you read HTTP response headers or cookies set by the server, and if you get hold of a session cookie through some workaround like reaching out to the browser and run JS, you can't send it to the server, because, among others, the Cookie header will be blocked. Now I'm building a Flex client against an HTTP API for my server product. I control both sides, so I can get get around the above limitations, now I'm wondering how. I see the following options:

include the session token in the HTTP payload include the token in the URL build my own HTTP client (... with blackjack, and hookers ...) in AS, using the Socket class I don't like (1), because I'm reimplementing functionality in my protocol that is already built into Struts, which I'm using to implement the server side. I then have to ensure that either both behave the same way, or turn off the usual way of session management and force other clients to use my protocol where they could just have the browser deal with it. I don't like (2), because I understand that there are security concerns with this, although I'm not too sure which

I don't like (3), because it's 2010 and tons of HTTP clients have been written by smarter people than me. So, are there other opportunities? Which of my "don't like"s do you reckon least severe? Are there ways to mitigate the problems I listed? For example, how insecure are session tokens in URLs really?

View 2 Replies

AS3 :: Test Services With Cookie Based Sessions In Flex?

Jul 6, 2011

As the title indicates the question is in regards to the service layer of a flex application. Specifically in a test case class. To call the services the user must first authenticate through an html/CF based page. Once that's done and the authentication has occurred the user is directed to the html page with the flex application embedded in. Once authenticated the server side CF code writes a cookie to the users computer. This cookie is then read by the flex app and is required for the flex app to make calls to the CF services.

The question is: how should this be handled in a test case class for the service class in the flex app? The following steps need to basically take place: use some account data to hit the server and authenticate, the cookie then needs to be written (which it will already), then the test case needs to pick up the session id from the cookie and pass it to the service call within the test case. That just all seems like too much for a test case class.

So, how is this type of thing usually handled. From what I gather it's typical for web service calls to require a session id like this.

View 1 Replies

Flex :: Duplicate Sessions Caused Multiple Requests With Different JSESSIONIDs?

Jul 7, 2011

I think I inherited bad code, here's the deal: In my command, I create a local var for the remote object and then call a method on it. In the result, if there's no data, I start a timer. This timer broadcasts an event every 2 seconds that continually calls this command until data is returned. Then the timer is stopped.

What we're seeing is that the method returns data once, and then the next time it doesn't (dupe Flex sessions error). It basically alternates. If we click really fast, sometimes we'll get two to work in a row. At times, the Java dev is seeing these requests returned with different JSESSIONIDs. I believe this is causing the duplicate Flex sessions error. I'm using Cairngorm; here's the execute command.

public function execute(event:CairngormEvent):void
{
ruleName = (event as FetchReportEvent).ruleName;
var ro:RemoteObject = ServiceLocator.getInstance().getRemoteObject("quantRemoteObject");
if (model.guid != null)

[code]....

View 1 Replies

Flex :: Dynamically Create Axis Via ActionScript In Adobe Flex Charting Library; Adobe Bug?

Mar 21, 2011

Multiple axis creation via MXML works fine:
http:[url]...

But when I'm trying dynamically create horizontal and vertical axis then I'm getting extra axes. I believe this is Adobe bug. How I can fix this behavior?

<?xml version="1.0" encoding="utf-8"?>
<s:Application
minHeight="600"[code].....

View 2 Replies

ActionScript 2.0 :: Flash Scrollbar Gallery - Replace The Rectangular Handle With Own Customised Handle

Feb 6, 2010

I'm creating a scrollbar gallery from a tutorial on this site. Though I've completed the tutorial, and customised the gallery to my own needs, however I'm trying to make a very small change to it - and no matter what I do, keep running into problems. I'm trying to replace the rectangular handle with my own customised handle - a (20 x 20) 'circular' png image that I've imported into Flash, made a graphic and stored in the library (though I understand it can be imported using actionscript, like the other images in the gallery).

[Code]....

View 7 Replies

Flex :: Handle Both CLICK And MouseDown Events In Flex?

Apr 18, 2011

I have a scenario where I am listening to both CLICK and MouseDown events for an object.

On MouseDown I do a startDrag(). And on Click, I perform something else.

But the problem is that, MouseDown event fires first and it initiates a drag. The click event does not fire.

View 1 Replies

ActionScript 3.0 :: Programmatically Detecting Between Adobe Air And Adobe Flex?

Feb 12, 2010

I have some shared code between an Adobe AIR App and an Adobe Flex App.

On one line of this code, the program must behave differently depending on if it is running within the Air runtime, or the Flex runtime.

How can I programmatically detect the difference?

View 1 Replies

ActionScript 3.0 :: Get Data From Php To Swf Using Sessions?

Jun 2, 2010

Trying to get data from php to swf using sessions, but have a bit of a problem. Here, I create the session

Code:
<?php
if(isset($_POST['action']) && $_POST['action'] == 'submitform')
{
$name = $_POST['name'];

[Code]......

I dont know if this is because i havnt placed it on the server yet, or if its something I need to resolve now?

View 21 Replies

PHP :: Mapping Login Sessions To Users

Jun 26, 2009

When I login a new session is generated. How can I later know for which login the session was generated? I am getting the session value, but how do I know which user the session is for and redirect him to that page?

View 1 Replies

Php :: Sessions Not Recognized When Going Through Flash / Uploadify

Jan 15, 2011

I'm writing an application which uses cookie-based sessions for authentication. All was well until I tried to integrate the uploadify jQuery plugin into my site. I need uploadify to send the files to my upload.php file. When I check the existence of any preknown session variables in that upload.php script, I get nothing. I've tried print_r($_SESSION) and got an empty array.

I'm not sure if this a problem with my php sessions code or my jquery uploadify code. I'm somewhat new at both.

/** INSIDE JQUERY **/
$('.fileUploadify').uploadify({
'scriptData': {'filesUploaded':'1','PHPSESSID' : <?php echo

[Code]....

View 2 Replies

PHP :: Facebook Sessions Not Working In Flash

Apr 28, 2011

We have a Flash site that integrates heavily with Facebook. When users sign up we get them to allow a Facebook app that ties into the site. This is done through the AS3 Facebook API library from Adobe. When users have done this, they should then be able to sign up, submitting some personal details and so on. The Flash sends this request to our PHP which then checks to see if the user is actually logged into Facebook, and has allowed our app. The problem we're having is that when a user goes to do this, the PHP facebook library says that the user is not logged in. If we then refresh the page and try signing up again, everything works fine.

View 1 Replies

ActionScript 3.0 :: Persisting Model Over Sessions Of Swf

Feb 2, 2007

So I had been working on this issue where I couldn't get a swf to reload in the same state it was originally loaded. Well further testing leads me to believe that my Model class is being persisted over multiple sessons in the player. Here is my model class:

[Code]...

So when I fire up the swf the first time in the IDE's player, i get 'no previous instance' as you would expect, then I hit ctrl + enter to restart the swf in the IDE's player and I get 'destroying instance'. So this tells me that the Model instance is getting persisted over player sessions. Unless I am mistaken, and correct me if I am wrong, I would assume clicking ctrl + enter (i.e refreshing the swf in the player) would act like a new swf session.

View 3 Replies

ActionScript 3.0 :: Saving Information Between Sessions?

Nov 8, 2009

I'm working on a game using Actionscript 3.0 and Flash CS4 and I'd like to make it save a player's scores and achievements between sessions locally on their computer. I thought the best way to do this would be by using cookies, and I started looking for ways to use JavaScript from ActionScript to save and load that information.While I was reading the articles I found on the subject, they seemed to suggest there was another way of saving information between sessions using something built into flash directly. Does anybody know about this? I'm not even sure what it's called. Even better if I could get some straightforward code for setting and recieving data from cookies using JavaScript or some other method.

View 3 Replies

Flex :: Handle Events Without Using A Framework?

Jan 4, 2010

I'm developing an AIR application with Flash Builder 4 Beta 2 (nightly SDK) an am not using a framework like mate. I have a couple of views and components in my application. An outline might look like this:

root
|- mainview
|-- toolbar

[code].....

View 1 Replies

Php :: Login Using Flex And PHP But How To Handle Session

Jan 7, 2010

I have a Flex login page that uses HTTPService to communicate with server side php script. Once user's credential is verified, a session will be created and the login page will redirect to the main Flex page with that session info. I'm not sure how to implement the session logic.

View 2 Replies

Handle Application Views In Flex?

Jul 1, 2010

I have a Flex application with three different views. Only one view is shown at a time, and the choice of view depends on what part of the application the user is working with. If it had been an ordinary HTML webapp I would have created three different HTML-templates/pages for each view.

What is the recommended way to handle such application views in Flex?

View 1 Replies

Media Server :: Running Multiple IP Multicast Sessions

Apr 5, 2011

am setting up multiple multicast sessions, i generated configurations for each session using a seperate stream name, IP address, port.

1) Is it possible to run multiple multicast session.From configuration, looks like we can, but need confirmation
2) How can i test these sessions using the default player ? or any sample player

View 1 Replies

Flex :: How To Handle Framework Events For ACE Test

Dec 23, 2009

In ACE Flex 3 , there is a topic "Handle Framework Events". Any document which lists all the 'required' framework events for ACE test? So I could know what are "framework" events and will focus on them.

View 1 Replies

Flex :: Best Way To Handle Clicks On Menu Items?

Mar 11, 2010

I do not know why but I see that itemclick event on a menubar do not fired unless you click a sub item. What is the clean way to handle clicks on menuitems which are on the top level and do not have sub menu items. For example I want to fire an event whenever MenuItem B is clicked.

<?xml version="1.0"?>
<!-- menus/MenuBarControl.mxml -->
<mx:Application xmlns:mx="[URL]" >
<mx:MenuBar id="myMenuBar" labelField="@label" itemClick="{itemClick(event)}" >
<mx:XMLList>
[Code] .....

View 3 Replies

Flex :: Web Services - How To Handle SOAP Response In 3

May 29, 2010

[Code]...

I want to read SOAP response in flex,am some what new to FLEX

View 1 Replies

Flex :: TabNavigator Can't Handle Disabled Children?

Jun 8, 2011

I've got a problem while migrating my TabNavigator from Flex 3 to Flex 4.5. Stripped to the bare minimum, the following code will produce the bug, namely that the second child of the TabNavigator fails to be created properly:

<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"

[Code]....

Is this really a Flex bug, or is there something I'm missing? I'm using Flex 4.5.0.20967, and all of this worked well in Flex 3.5.

View 1 Replies

C# :: Handle Http Fired By Flex In Server?

Jan 22, 2012

I am trying to send a simple HTTP message from Flex to C# server, but it seems that I am getting tow calls, first is the real one and the second is an empty one.

Why is that and how can I handle it?

This is my C# code:

TcpListener listener = new TcpListener(IPAddress.Any, 9400);
listener.Start();
Console.WriteLine("Server started");

[Code].....

I been trying to send a true HTTP response a notice another thing, the second call is coming without waiting for the first call, if I am putting the response thread to short sleep(100 milliseconds in my test) then I am getting the second call before I been able to response for the first one.

View 3 Replies

Actionscript 3 :: ASP.net MVC - Sessions - Record The Users Progress Then Save To A Database

Jul 21, 2011

I want to add the ability to have my flash game record the users progress then save to a database. That part is pretty easy, but how can I make it so the user can login and continue their game. I also wanting to know if it'll be better for the game progress to be saved with SharedObjects or with an SQL database. I would like it that the game could be played on any website and their data can still be accessed and played if that is advised. I am new to user sessions with AS3 and need pointers.

View 1 Replies

AS :: Flex - Handle Custom Event In Parent Component?

Feb 6, 2010

I defined a simple event class:

public class NewMoveEvent extends Event
{
public function NewMoveEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=true)

[code].....

View 1 Replies

Flex :: Actionscript :: Create A Class To Handle Events

Apr 7, 2010

in Adobe tutorials, they suggest to create a class to handle the events (see below the copy/pasted code, and link to page).I was wondering if I have to handle all events with the function handleAllEvents, using if statements to check if the target is the one I want, and the event is the one I want.i.e. if (event.type=="click") && (event.currentTarget == "myId")Should I have a list of ifs (for each target and each event type ?)[code]

View 1 Replies

Handle M:M Entity Relationships In Flex / Java Web Application?

Dec 21, 2010

I am struggling to come up with a way to efficiently manage Flex entities that have a many-to-many relationships between their JPA/Java counter parts.[code]Both of these entities can exist independently of each other and both have a 1:M relationship with the other. The relationship is not really owned by one side or the other.Within the application there are Flex UI's that sometimes want to see viewers based on movies and other UI's that want to see movies based on viewers.Currently both the Movies.Viewers and Viewers.Movies collections are lazy loaded by JPA which works fine. The problem is that every time I ask a viewer for it's list of movies, then they all get sent over the wire and then within Flex I end up with a bunch of Movie objects that (often, not always) duplicate the ones I already have there.

It seems inefficient at best and could likely cause errors if the duplicate objects are not dealt with.In my real application I have tons of these types of relationships all over some very large object graphs.It almost seems to me that the lazy loaded object collections need to be turned into eagerly loaded collections of foreign keys which are used to explicitly load objects on the Flex side of things. But this seems like I am writing a JPA provider in Flex! Is the correct answer to never store state in a Flex application? (Yikes)I should add that all my value objects have a UID that is created on the server side, so I could somehow use that to find/remove duplicates on the Flex side. But how?

View 2 Replies

Flex :: Handle Calls To Multiple Functions In The Same Web Service?

Jan 22, 2011

I have a web service written in ColdFusion. In this web service, there are two functions; one is to return all the questions in a quiz and the other one is to return all the answer selections to the questions in a quiz.

[Bindable]
private var questionArray:ArrayCollection;
private var cfquiz:RemoteObject;

[code]....

I have the codes above. loadQuestions is called at creationComplete to retrieve the questions. Things are working fine. What I want to do is to call another function within the same web service, returnAnswers, to return the answer options for a question. Since I have cfquiz associated to the web service already, I was using cfquiz to call returnAnswers. However, there is an event listener associated to cfquiz already, resultHandler is being called when returnAnswers comes back with the results.is it possible to check which function returns the results within resultHandler? If so, how? And second, what is the best way to handle calls to multiple functions within the same web service?

View 3 Replies

Flex :: Flexlib ScheduleViewer How To Handle Clicks On Items

Apr 14, 2011

I'm trying to use a flexlib schedule viewer in my application. I want to have it so that when I click on a scheduled event, it calls a function in my main app (that will allow me to edit the event). But there doesn't seem to be any specific function for anything like this built into the class ie no event dispatched when I click on an event.

I can use the 'click' function to detect that the item has been clicked on.. and have tried something like this:

[Code]...

This method isn't very reliable because if it only works the first time.. once an item is selected, it stays selected so all following clicks on the item fulfills the condition.

Is there any way to determine whether an event was being clicked on? Or do I have to extend the component and add some sort of clickEvent when an event is clicked on.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved