Groups | Blog | Home
all groups > macromedia flash flashcom > march 2006 >

macromedia flash flashcom : IP Restriction


Graham Carroll
3/15/2006 4:24:21 PM
Hey guys

We are looking to implement client IP restriction for certain applications
running from FCS.

I have the "programming flash communication server" book and it does have an
IP check section but i cant figure out where to put this code...

Has anyone done this before?

Hope someone can help

g
JayCharles
3/15/2006 8:45:25 PM
Well... here's the quick and dirty way to do it

application.onConnect = function(newClient, name){
if (newClient.ip == "127.0.0.1"){
// do this if it's a match
} else {
// do this if it's not a match
}
};

As I said, that's a quick and dirty. It's good if you want to allow only
certain IP's, but it's difficult to manage if you just want to block certain
IP's.

The better way to do things is to employ a ticket based system that can be
authenticated by FCS. I think there's a little info on that somewhere in the
PFCS book.
Graham Carroll
3/16/2006 12:00:00 AM
Thanks Jay

Ill try that today...

One question though, what if I want to only allow whole ranges of IP's?

We need to have certain applications only available on campus, and others that
are available to all.

Thanks again for the speedy reply.

g

AddThis Social Bookmark Button